help... for LINUX/UNIX users only

Reply

Join Date: Mar 2007
Posts: 61
Reputation: squinx22 is an unknown quantity at this point 
Solved Threads: 0
squinx22 squinx22 is offline Offline
Junior Poster in Training

help... for LINUX/UNIX users only

 
0
  #1
May 24th, 2007
hi,

Is it possible to run a gedit command in the terminal that will create a text file automatically and save it in my desired file extension?

For example, if I run:

gedit file.txt

by default, it will open a null document named file.txt.

But all I want is to write and save texts to file.txt automatically so that it wont be NULL.

what should I type in the terminal?
tnx....
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,614
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 713
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: help... for LINUX/UNIX users only

 
0
  #2
May 24th, 2007
Write a shell script that creates the file for you, then opens it using gedit.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 539
Reputation: thekashyap will become famous soon enough thekashyap will become famous soon enough 
Solved Threads: 50
thekashyap's Avatar
thekashyap thekashyap is offline Offline
Posting Pro

Re: help... for LINUX/UNIX users only

 
0
  #3
May 24th, 2007
If you just wanna create file without any contents use the command that is meant for it.
Use "mkfile", or simply "touch" if you don't wanna complicate things.
If you want to write something in the file use redirection.
Finally, next time you might wanna use Unix Shell Scripting forums..
Are you Agile.. ?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Shell Scripting Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC