944,079 Members | Top Members by Rank

Ad:
May 24th, 2007
0

help... for LINUX/UNIX users only

Expand Post »
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....
Similar Threads
Reputation Points: 7
Solved Threads: 1
Junior Poster in Training
squinx22 is offline Offline
68 posts
since Mar 2007
May 24th, 2007
0

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

Write a shell script that creates the file for you, then opens it using gedit.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
May 24th, 2007
0

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

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..
Reputation Points: 254
Solved Threads: 74
Practically a Posting Shark
thekashyap is offline Offline
804 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: script to address restartibily issue
Next Thread in Shell Scripting Forum Timeline: Help!need Help reading the bash script





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC