How can I create a short file from within a shell script? [message #98058] |
Mon, 12 January 2004 06:46 |
Art Metzer
Messages: 2480 Registered: December 2002
|
Senior Member |
|
|
Hello,
I'm trying to create a Korn shell script that will create a file by the name of a.txt that in turn contains only the text NO DATA.
Here's the shell script (filemaker.sh) I've been attempting:Note, to get that Ctrl-D in there, I did do a Ctrl-V in vi, followed by a Ctrl-D.
Now, I go to execute my shell script:$ chmod +x filemaker.sh
$ filemaker.sh
...and it just hangs there. What's worse, after I Ctrl-C out of the hang, a.txt exists, but is completely empty (0 lines, 0 characters).
How can I create that file with the name and contents I want from within a Korn shell script?
Thanks,
Art.
|
|
|
|
|
|