10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that checks if the script has been ran with sudo.
If the script is not ran as sudo, the current script is being executed with exec sudo bash.
You are asked for a password, you type in the password, success. Everything is perfect - the commands inside the script are ran as sudo.... (1 Reply)
Discussion started by: boqsc
1 Replies
2. Emergency UNIX and Linux Support
I have a file that has about 3000 commands , listed one below the other. I would like to execute them all in one go. Is there a simpler way to do it - like a batch file processing, than executing one line at a time? (3 Replies)
Discussion started by: ggayathri
3 Replies
3. Shell Programming and Scripting
I would like to execute a commands in four different servers through ssh at a single instance(simultaneously).
Below are the details with examples,
ssh user1@server1 "grep xxxx logs"
ssh user1@server2 "grep xxxx logs"
ssh user1@server3 "grep xxxx logs"
Each statement will take some... (4 Replies)
Discussion started by: Amutha
4 Replies
4. Shell Programming and Scripting
Hi,
I have a question here. Please suggest.
I have a file which has some unix commands to be executed through shell scripting. The number of commands will be different every time based on some external instructions i received. I manually keep the instuctions in this file.
i need to execute... (1 Reply)
Discussion started by: rbalaj16
1 Replies
5. Shell Programming and Scripting
Hi,
I work on a jumpserver and I wrote a script to transfer a file from source server to destination server.
#!/bin/ksh
echo "\nEnter the file name:\n"
read name
echo "\nSelect the Source server\n"
echo "1. ODS PROD "
echo "2. ODS DROPBOX"
echo "3. ODS STE"
echo "4. ODS STE DROPBOX"... (6 Replies)
Discussion started by: ajayakunuri
6 Replies
6. Solaris
Hi SSHers,
I have embedded this below code in my shell script..
/usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5`
SSH to both these servers are public-key authenticated, so things run... (13 Replies)
Discussion started by: LinuxUser2008
13 Replies
7. Shell Programming and Scripting
Hi all,
I am just trying to read the contents of a file. basically this file has a list of dat files. then i want to access these dat files n execute a script on them one by one using a loop.
i hav e written like this
ls -l | cut -c 58-88 > file1.txt
while
do
arr1="$( sed -n '1p'... (7 Replies)
Discussion started by: navjyotisonu5
7 Replies
8. Shell Programming and Scripting
The thing that we need to be able to do is:
- Scanning tapes from failed backup jobs with bscan (a bacula command)
- loading the next tape with the mtx command
Bscan does unload tapes but does not load them.
Bscan comes with this message when it's done with a tape:
Mount Volume... (0 Replies)
Discussion started by: Tr00tY
0 Replies
9. UNIX for Dummies Questions & Answers
how to execute more than one command at the same time in unix .. (4 Replies)
Discussion started by: hemaa
4 Replies
10. Shell Programming and Scripting
Hi,
Please help me out.
I have around 700 sql files to execute in a defined order, how can i do it from shell script (3 Replies)
Discussion started by: anushilrai
3 Replies