Not sure how to post this, I'll just come out with it gang...
I ran into some trouble loading certain commands using an editor called "pico editor". All was working fine and suddenly stopped responding to my commands which I'll post in a bit; which contained the characters mentioned above...
So I thought okay I'll try another editor, lo and behold, I cannot run the code there either because this editor does not like me adding #!/bin/sh, and has deleted these chars rendering the code virtually unusable.
Is there a command I need to add in order for the vi editor to accept #! in the code. pico is not working and I have since driven to the college just case it was my network, same treatement there:
[CODE=UNIX]
#!/bin/sh
#sample shell using the if
echo "Let's create a fancy directory"
if [ -d unixbackup ]
then
echo "directory unixbackup exists"
else
echo "Looks like directory unixbackup does not exist"
echo "Would you like to create it now? (y/n)"
read x
echo $x
if [ $x = "y" ]
then
mkdir unixbackup
echo "Super! unixbackup directory has been created"
else
echo "Sorry! unixbackup directory has not been created"
fi
fi
[/CODE]
It's nothing fancy but if I could run it through the vi editor, it would be great.
What are your thoughts?
Thanks!
Dököll
I ran into some trouble loading certain commands using an editor called "pico editor". All was working fine and suddenly stopped responding to my commands which I'll post in a bit; which contained the characters mentioned above...
So I thought okay I'll try another editor, lo and behold, I cannot run the code there either because this editor does not like me adding #!/bin/sh, and has deleted these chars rendering the code virtually unusable.
Is there a command I need to add in order for the vi editor to accept #! in the code. pico is not working and I have since driven to the college just case it was my network, same treatement there:
[CODE=UNIX]
#!/bin/sh
#sample shell using the if
echo "Let's create a fancy directory"
if [ -d unixbackup ]
then
echo "directory unixbackup exists"
else
echo "Looks like directory unixbackup does not exist"
echo "Would you like to create it now? (y/n)"
read x
echo $x
if [ $x = "y" ]
then
mkdir unixbackup
echo "Super! unixbackup directory has been created"
else
echo "Sorry! unixbackup directory has not been created"
fi
fi
[/CODE]
It's nothing fancy but if I could run it through the vi editor, it would be great.
What are your thoughts?
Thanks!
Dököll
Comment