![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Create file in script | paparazi | Shell Programming and Scripting | 3 | 02-26-2008 03:16 AM |
| can we create a GUI by shall script | johnray31 | Shell Programming and Scripting | 1 | 07-24-2007 10:47 AM |
| create a text file in a script | n8575 | UNIX for Dummies Questions & Answers | 2 | 02-07-2006 12:38 PM |
| how do I create an ftp script | leonard905 | UNIX for Dummies Questions & Answers | 2 | 01-14-2005 06:25 AM |
| script to create tar file | ajrandrup | UNIX for Dummies Questions & Answers | 2 | 12-03-2003 01:06 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Create a file from within a script
Hi,
I want to create a file from within a script that checks whether the file itself exists or not. Like: if [[ ! -e .theFile]] then echo Creating file... cat << EOF > .theFile echo This line should be in the file EOF fi If I run the script with no condition (commenting out the first and last line), it works. But if I try to create the file within the "if" I get the following error: ./test: syntax error at line 3 : `<<' unmatched Any idea on how to work around this? Thanks in advance. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|