I'm a completely new to bash scripting, so bare with me. I have a script (let's call it script) with a file parameter. I want the script user to be able to use wildcards in this parameter.
What do I have to use to cause the parameter variable revert to the full path?
eg script ~/*gz
So inside bash
do x to turn variable $1 (~/*gz) into /home/name/file.tar.gz
Hi All,
I have a shell script in Linux and it will be invoked by 2 methods,
1) An automated background process .
2) Logining into the box and directly executing the script.
I need to put a validation in my shell script such that it will be executed successfully on when an automated background process invokes it.
Hi
I have a bash script which takes parameters
Code:
sh /tmp/gdg.sh -b BASE-NAME -n 1 -s /source/data -p /dest/data/archive -m ARC
gdg.sh will scan the /source/data and will move the contents to /dest/data/archive after passing through some filters.
I have a script in Server A that will run a script in ServerB.
Code:
#!/bin/ksh/
ssh user@server "/path/script.sh"
The script permissions are as follow:
Code:
-rwxrwxrwx 1 user dba 75 Jun 11 10:00 script.sh
I checked the existence of 'ksh' in /bin and its there.
Hi,
I want to make Excel files password protected present in my Unix directory. I have a application which will basically invoke a shell script with a parameter passed. The purpose of shell script would be to pop up a box to enter password. This password will be validated against database entry for the parameter passed to the script from front end application.
Hi all,
I need to deploy two scripts on around ~100 machines and have only OPSware.
Hey everyone, I have a very simple BASH shell script that simply checks what processes I have running on a few different nodes, which are preknown. Currently, my script spews out all the processes on all the nodes, but I'm really only interested in one process per node. The processes I am interested are the only .exe processes on the nodes.
i am passing input parameter 'one_two' to the script , the script output should display the result as below
one_1two
one_2two
one_3two
Code:
if [ $# -ne 1 ]
then
echo " Usage : <$0> <DATABASE> "
exit 0
else
for DB in 1 2 3
do
DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}`
done
fi
---------- Post updated at 11:06 AM ---------- Previo
How can I automatize this task?
1) You are at A.
2) You ssh into B.
3) You run a script at B, that needs a parameter known at A.
First, I thought perhaps I could send the value when I opened the connection with ssh. Then, probably simpler, between 1) and 2), scp the entire script to the same location at B (replacing the old one). But still, how do I execute the script at B?