Let's say i want to run a bash script, is there a command in the terminal to specifiy the values that my script would ask for instead of using read?
for example at the time that i type bash script1.sh can i somehow type values to pass to the script or does it first have to be executed.
Like bash script1.sh 3 4
Code:
#!/bin/bash
some command here like (date)
another command here like (ls -a)
script // to start recording
other commands here or ./anotherscript
and here
and here
exit // to stop recording
another command here
and another one
The first problem is that script(to record file) doesnt start. Anyway, i've found several solutions using read or echo.
Hello All,
I am writing an Expect Script to execute some commands over ssh then exit the script.
The script works just fine if I automate everything and assuming the correct password was entered.
So this Expect Script gets executed from a Bash script...
I inherited some code where one script references another like this:
#Script1.ps1
param($arg1)
# do some stuff
# call script2 with argument from script1
.\script2.ps1 $arg1
#script2.ps1
param($arg1)
# do some stuff unique to this script
This works fine locally, but when both scripts are deployed to remote server, and script1 is called via invoke-command, the remote PS instance complains tha
i have a very big script i have that i'd like to add a timeout to.
this script runs on a several remote host.
I have a script which will run for sometime, i want to monitor it's progress by sending out a mail by runing a infinite loop from command line
for eg.
I have a script that outputs a simple integer like "10", then i have a second script where i want to call this script and grab the integer as a variable.
#!/bin/bash
KBPS= ## NEED OUTPUT FROM /USR/LOCAL/BIN/ETH0TX.SH
THRESHOLD=50 #KBPS
if [ $KBPS -gt $THRESHOLD ]; then
exit 1
fi
Is that possible?
I have a script that calls a subscript and attempts to release/disown this script so that Jenkins calling the script can complete successfully. It seems to release the script on the command line, so I can log out or execute other scripts when on the command line (SSH), but Jenkins hangs waiting for the released script to finish.
Hi!:KS:
I have been reading and studying Bash for weeks and it still eludes me to some degree. I didn't look at the Advanced Bash Guide because I haven't been able to make it past my first script.