![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HELP! writing shell script with c++ file | deadleg | UNIX for Dummies Questions & Answers | 1 | 03-08-2008 10:40 AM |
| help for a perl script - writing to a data file | meghana | Shell Programming and Scripting | 2 | 02-04-2008 05:05 PM |
| script for writing to a file | innocent | Shell Programming and Scripting | 0 | 01-20-2008 10:15 AM |
| writing script file for database | shaksing | Shell Programming and Scripting | 3 | 07-26-2007 09:30 AM |
| help writing script file | lanboy_2005 | UNIX for Dummies Questions & Answers | 19 | 03-10-2004 10:58 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Writing to a file within a script
Hi, At the moment i have a script where it asks the user if they want to create a file and what to put in the file. The problem is when the script is run the user inputs the information, though when they are finished typing what they want to be in the file there is no way for the program to know they are finished or the user to exit. The code that i am using for this currently is: Code:
echo "\nPlease enter a name of a file that you wish to create" read file echo "\nPlease type something that you wish to be inside it\n" read desc cat >$file $desc echo "Thank you for creating a file" Thanks for any help. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|