![]() |
| | #1 |
| Registered User Join Date: Jan 2004
Posts: 68
| Linux Scripting IF Else problem here is my code it keeps giving me an error line 10 syntax error near 'then' Code: [ if[ $choice = 1 ]; then tail +$3 $1 | head -n$4 > $2 elif[ choice =2 ]; exit 2 else
__________________ -Ti22- Last edited by Ti22; 11-27-2004 at 10:41 AM. |
| Ti22 is offline | |
| | #2 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,706
| > if[ $choice = 1 ]; A space between if and [ perhaps |
| Salem is offline | |
| | #3 |
| Registered User Join Date: Jan 2004
Posts: 68
| OMG thx lol what a simple problem sorry to bother u.
__________________ -Ti22- |
| Ti22 is offline | |
| | #4 |
| Registered User Join Date: Jan 2004
Posts: 68
| another question, instead of getting the command to overwrite a file how do i get it to append to a file?
__________________ -Ti22- |
| Ti22 is offline | |
| | #5 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,706
| Using redirection > overwrites >> appends |
| Salem is offline | |
| | #6 | |
| Registered User Join Date: Jan 2004
Posts: 68
| Quote:
__________________ -Ti22- | |
| Ti22 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OpenGL Linux Line Drawing Problem | swanley007 | C++ Programming | 2 | 04-03-2006 09:31 AM |
| Problem with porting of Linux code to Windows, FORTRAN/C. | stormlab | C Programming | 1 | 10-18-2005 10:20 AM |
| Dabbling with Linux. | Hunter2 | Tech Board | 21 | 04-21-2005 04:17 PM |
| Problem with C++ in linux | MelaOS | C++ Programming | 2 | 12-28-2003 06:29 AM |
| Linux modem problem | VooDoo | Linux Programming | 5 | 08-19-2002 05:34 AM |