Reminder Command
Hello everyone,
I have something wrong with this command i don,t know what is the problem can someone help me please :study: Code:
! /bin/sh |
You didn't quote out your comments, for one-
Code:
# Start your code from here |
A script typically starts with something like this---to tell the shell what to use to run the script:
#!/bin/bash Also, you need to format your code for readability (by us---and by YOU)---example: Code:
while read <stuff>; do Code:
while read EventTitle FirstName LastName MeetingMonth MeetingDay EmailAddress |
PS---Tell us exactly what happens when you run the script. Just saying "something is wrong" does not give us any clues.
|
Quote:
this is the error Code:
./MeetingReminder.sh: line 3: !/bin/bash: No such file or directory |
terminal >
Code:
which $SHELL |
Quote:
Code:
#!/bin/sh |
Are you trying to run this with sh or bash?
You have "! /bin/sh" at the top, which while it's the wrong syntax, implies you want to run the script in sh, then two lines later you have "!/bin/bash", which again is the wrong syntax, but implies you want to run the script in bash. Pick one, change it to #!/bin/sh or #!/bin/bash, delete the other, and put a # in front of all comment lines. |
I highly suggest that the OP sit down with a good scripting tutorial and start working through it. Don't try writing complex scripts until you're at least reasonably familiar with the basics of the syntax.
It also goes without saying that you shouldn't just cut&paste code from the net without understanding what it does. I recommend the BashGuide and linuxcommand as good starting points. Also have a look at the other links below for commonly-made errors and situational how-tos. http://mywiki.wooledge.org/BashGuide http://www.linuxcommand.org/index.php http://mywiki.wooledge.org/BashPitfalls http://wiki.bash-hackers.org/scripting/newbie_traps http://mywiki.wooledge.org/BashFAQ Quote:
You could also similarly use the -a option (assuming bash or similar); only then the words are stored in an array instead. |
By the way, there are already many good "reminder" style programs out there. Is there any special reason why you want to script this?
|
Reminds of the Slackware quotes. If you could place reminders instead..
I don't have Slackware yet though so I can't examine. It probably has something to do with the post-login scripts in bash. |
All times are GMT -5. The time now is 10:07 PM. |