10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
2. Shell Programming and Scripting
friends,
i have application commands to execute in shell script it is something like this. i will login with user data it takes me to $ prompt. Example given below
login: data
ps : xxxx
$ MNSinput --this takes me to greater than prompt >
> ops --this is command i enter this output... (7 Replies)
Discussion started by: udaykrishna
7 Replies
3. Shell Programming and Scripting
Hello,
I need to execute below command in shell script
srvctl relocate service -d $database -s $service -i $avail -t $pref -f and also need to get the errors ,if any,in another file.
What's the right way to execute such commands in shell script?
Best regards,
Vishal (1 Reply)
Discussion started by: Vishal_dba
1 Replies
4. Shell Programming and Scripting
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies
5. UNIX for Dummies Questions & Answers
Hi ,
I have to write a shell script to telnet to specific host and execute the admin command there. Please help me to do that.
Eg : telnet hostname portno
admin command
exit (3 Replies)
Discussion started by: arukuku
3 Replies
6. UNIX for Dummies Questions & Answers
ssh -q <hostname> /opt/tcs/satish/tst.ksh
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh
tst.ksh has "nohup <command> & "
when i execute below script , its throwing error as
nohup can not be found
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log &
can someone let me... (5 Replies)
Discussion started by: only4satish
5 Replies
7. Shell Programming and Scripting
Hi All
I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh
URL="www.google.com"
VBURL="10.5.2.211"
echo "Setting route for $URL for GPRS"
URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1`
echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies
8. Shell Programming and Scripting
Hi,
I need to run a script whenever the Cron file is modified.
The requirement is whenever a user modifies the cron file, the script should run automatically.
Can you please provide your inputs ? (5 Replies)
Discussion started by: harneet2004us
5 Replies
9. Shell Programming and Scripting
Hello all,
I have just started doing shell scripting.
I want to read a file which stores the status of my job I have submitted
on a cluster.
The file looks something like this :
========================FILE=============================
crab: Checking the status of all jobs: please wait... (4 Replies)
Discussion started by: learn_linux
4 Replies
10. Shell Programming and Scripting
i have logged in as user.
I want to write a script to login into root and execute commands for eg. ifconfig or other command.
kindly help me out. (6 Replies)
Discussion started by: pradeepreddy
6 Replies