Forum Moderators: bakedjake
The file is named pipefilechk.sh and it is in the /bin/ folder. I try to call it in command line with "exec pipefilechk.sh".
I also have it in a crontab, but it is not working.
*******************
#!/bin/bash
if [-s /usr/local/src/blist.psv];
then
/usr/bin/mysql -u someuser -p somepassword < /usr/local/src/blist.sql;
fi
********************
When I just type the "then" command directly into command line, it works.
The more I read, though, the more I realize that this whole issue is specific to bash syntax and shell commands. It is a mess, because my script is using reserved shell commands (-u and -p in the mysql command, and the dot in the files).
This is why it was seing "tokens".
I can't find a work around in the manual or reference files. And only someone who knows shell can answer this.
I suspect it can only be done with assigning variables. But the actual syntax is still escaping me (no pun).