Hi,
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
Printable View
Hi,
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
> if[ $choice = 1 ];
A space between if and [ perhaps
OMG thx lol what a simple problem sorry to bother u.
another question,
instead of getting the command to overwrite a file how do i get it to append to a file?
Using redirection
> overwrites
>> appends
cool man thx, as you can tell i am a noob in linux being forced to write a shell script.Quote:
Originally Posted by Salem