10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Im running the below command
sshpass -p mypassword ssh -t user1@server2 /bin/bash -c 'echo "mypassword" | sudo -S -l; echo "$?#`grep -iE "user66|dbuser|tomcat|splunk|stash|jira|user2|docadmin" /etc/passwd`"; exit'
Below is the error I get: Output:
I run this command across a... (1 Reply)
Discussion started by: mohtashims
1 Replies
2. Shell Programming and Scripting
Hi ,
I have written a small script :
set -x
#!/bin/ksh
for i in `cat /tmp/list` ( list contains remove servers )
do
ssh -t $i << EOF
uname -a
cd ~user
echo "Enter the dir >"
read dir
path=`ll -ld /home/user/"$dir"`
if ; then
echo "Dir exists "
read
rm $path
else
echo "no such... (9 Replies)
Discussion started by: kpatel786
9 Replies
3. Shell Programming and Scripting
Hi,
I have a requirement where in i need to write a shell script to set users password to never expire. I know the command which is used to perform the same .. which is chage command.
But, could not figure out how to do the same in shell script.
Could you please help me with the shell... (3 Replies)
Discussion started by: suren424
3 Replies
4. Shell Programming and Scripting
Hi all,
I am baffled on this. Solaris Irix system.:confused:
I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek:
... (10 Replies)
Discussion started by: weddy
10 Replies
5. Shell Programming and Scripting
I'm trying to copy files from a remote windows server to Unix server. I was successfully able to copy files from windows server using command prompt but when I run these commands from a script it's not working as expected. commands used:
sftp user@remoteserver.com
lcd local_dir
cd... (3 Replies)
Discussion started by: naresh7590
3 Replies
6. Shell Programming and Scripting
Hi,
The below command is not giving me the count , Can somebody help me in re-writing this pls .
Proc_Exist=`ssh -q -o "BatchMode=yes" -o "PasswordAuthentication=no" $OAUSER@${Primary_Node} ps -ef |
grep -v grep | grep "${ICM_Proc}" |wc -l `
Also the same problem with below... (13 Replies)
Discussion started by: Y.balakrishna
13 Replies
7. Shell Programming and Scripting
Hi,
I wrote a simple script, which will call other scripts or run commands on a UNIX server. my script has multiple steps/commands with some delay in between.
I usually get some email notifications after the successful execution of each step.
**My intention is to get email alerts when it is... (5 Replies)
Discussion started by: System Admin 77
5 Replies
8. Shell Programming and Scripting
Hi,
I am running a shell script from a central server to multiple remote servers using the following code:
application_check()
{
# Linux/UNIX box with ssh key based login
SERVERS=`cat /tmp/server-details`
# SSH User name
USR="user"
# create new file
> /tmp/abc.log
# connect... (2 Replies)
Discussion started by: mystition
2 Replies
9. UNIX for Dummies Questions & Answers
Experts,
Im trying to remote into a server, run a script that resides on that server and capture the information displayed & store in a local file.
I struggled with this yesterday & finally that script is working now.
Now, here is a scope creep and the script that I wrote for 1 remote... (2 Replies)
Discussion started by: OMLEELA
2 Replies
10. Shell Programming and Scripting
All, I need to write an unix shell script which inserts some records into a file located in remote servers.
* Get the input from the user and insert according the first row. It should be in ascending order.
123451,XA,ABA
123452,XB,ABB
123453,XC,ABC
123455,XE,ABE
123456,XF,ABF
123458,XG,ABG... (2 Replies)
Discussion started by: techychap
2 Replies