Search Results

Search: Posts Made By: Sree10
1,285
Posted By Sree10
-a String operator in shell script
What does -a operator for String manipulation imply?
Eg: if [ -a $string];then
6,285
Posted By Sree10
I am trying to run this on a Linux host. I have a...
I am trying to run this on a Linux host. I have a customized shell script which when run prompts for some inputs. When i run this script manually from the command line, I can specify the input as y...
6,285
Posted By Sree10
How to send keyboard inputs toa UNIX command executed from a shell script?
I have a unix command that prompts for 'y'. How do I run this from my shell script?
4,839
Posted By Sree10
To find the latest modified file in a directory
I am trying to fetch the latest modified file from a directory using the command
find . -type f -exec ls -lt \{\} \+ | head | awk '{print $9}'

After the O/P, I get the below mentioned error and...
5,603
Posted By Sree10
test.sh contains the commands. ssh -qtt...
test.sh contains the commands.

ssh -qtt user@$host "sh -s '${version}'" < test.sh
works absolutely fine. I run into issues only while looping.
5,603
Posted By Sree10
I am able to iterate successfully through the...
I am able to iterate successfully through the array if I specify the commands as mentioned below.


for host in "${host[@]}"
do
echo $host
ssh -qtt user@${host} "cd /build && cp -p web.zip...
5,603
Posted By Sree10
for host in "${host[@]}" do ssh -qtt...
for host in "${host[@]}"
do
ssh -qtt ohsadm@${host} "sh -s '${version}'" < test_steps.sh
done


exits after the first iteration. host array has 4 servers. I want the ssh in the for loop to...
5,603
Posted By Sree10
Ssh to an array of servers in a for loop
There are 4 remote hosts that I have stored in an array. A ssh trust has been created from the local host to each of the remote hosts.
I am trying to ssh to each of the servers in a for loop as...
5,704
Posted By Sree10
Thanks!, but please can you explain me how...
Thanks!, but please can you explain me how exactly that happens with

ssh -qtt $user@$host "sh -s "$version"" < test.sh

and not with

ssh -qtt $user@$host < "test.sh "$version""
5,704
Posted By Sree10
What is the significance of sh -s in ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh?
Please can you help me understand the significance of providing arguments under sh -s in
> ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh
8,664
Posted By Sree10
Hurray it works! Thanks a lot! Please can you let...
Hurray it works! Thanks a lot! Please can you let me know why the parameters need to be passed with sh.

ssh -qtt user@host 'sh -s 00' < test.shworks fine, but if I pass a variable it doesnt...
8,664
Posted By Sree10
Any pointers on how I can pass positional...
Any pointers on how I can pass positional parameters to the local script executing on remote machine.
8,664
Posted By Sree10
I tried ssh -qtt user@host < 'test.sh 00' I get...
I tried ssh -qtt user@host < 'test.sh 00'
I get an error
test.sh 00: No such file or directory
8,664
Posted By Sree10
To run a local shell script in a remote machine by passing arguments to the local shell script
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh

However, when I try to pass arguments to test.sh it...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy