I have a shell script that accepts an argument and uses that in the script. So to run the script I type
/path/to/script argument
The problem is when trying to setup that file to run using the at utility. I have tried
at -f /path/to/script argument 17:45
at -f '/path/to/script argument' 17:45
but neither of these options work.
Hi there,
I am new to scripting, please advise.
I have a script running on the PC server, the script is to log on some ip to get something.
script-name IP -l username
after running the command, I need to type the password for the script to run.
Now, I like to change the script to web cgi script, I can get the IP from the web page, hardcode the uername, but not sure how to give the cg
Hi,
Im trying to run script A which requires path /sbin.
I have a crontab entry to run script A every 10 minutes.
Script A is executed fine by cron, but because script A requires /sbin in its path it fails to run.
My situation is script A get overwritten from time to time so I can't modify script A to set path in there.
So my question is...
Hi all,
I need to deploy two scripts on around ~100 machines and have only OPSware.
I was trying to figure out how to export my environmental via script instead of changing my .bashrc file.
I found this old useful post that said:
Variables can only be exported to subordinate processes, you can't pass them back up to the parent. If you really want your script to affect the parent shell's environment, run the script as
.
I'm run a script with cron:
*/10 * * * * flock -n /tmp/lock script
I have to make sure that only one instance of the script is running at the same time, and for that I'm using flock. The problem is that sometimes this script starts a daemon, in this case, the daemon blocks the following script executions.
I have a script on a server-A
Script-A
#!/bin/bash -l
echo "script-A.sh" | change-environment.sh
When I ssh onto server-A and execute it, it works fine.
However, when I
ssh user@server-A ./script-A.sh
Script-A executes, but throws an undefined variable error in change-environment.sh.
I have a bash script that works with relative paths. It needs to have a working directory that is equal to the directory the script is stored in. This works fine as long as I start it from the prompt, because I can cd to the script's directory first.
I needed to start a python program in background i.e daemonize it,so I wrote a init script for this purpose.But the problem is that whenever I write the command
sudo start service solon_server(name of script)
the program runs but the init script doesn't return.