Sponsored Content
Top Forums Shell Programming and Scripting how to avoid space to run remotely Post 302208463 by madhusmita on Tuesday 24th of June 2008 02:33:36 AM
Old 06-24-2008
how to pass argument remotely

If I run the following command remotely after ssh than it works fine
su - oracle -c "/oracle/product/102/db/bin/dbshut"

But If I run the following command it doesn't work
su - oracle -c "/oracle/product/102/db/bin/lsnrctl stop"

Because I think there is a space is present between lsnrctl and stop..So how to avoid that space

But if we run lsnrctl stop in that sever it works fine..Here lsnrctl is a script available and stop is the argument we are passing

Please suggest

Last edited by madhusmita; 06-24-2008 at 04:28 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Running UNIX commands remotely in Windows box from Unix box – avoid entering password

I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked. Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies

2. UNIX for Dummies Questions & Answers

Exit from telnet when run Remotely

ssh user@host -q -n 'grep `hostname` /etc/hosts; telnet 10.100.23.45 1234;' When i run this command remotely it is hanging and not giving me the prompt, Can anyone tell me how can I exit a telnet command remotely please. Thanks. (10 Replies)
Discussion started by: venu_nbk
10 Replies

3. Shell Programming and Scripting

How to avoid the space

Hi, I have some problem with following command. $path='pwd'.”/pack”; When I check the value in the variable path , it give the following output /tmp/new /pack The pwd will be /tmp/new Now the problem is the spaces is added between pwd and the appended path. I need the output like... (5 Replies)
Discussion started by: kalpeer
5 Replies

4. Shell Programming and Scripting

help needed. run shell scipt remotely

Dear all , I have a script. this script called get.sh and can get some solaris infomation and save the result as result.tar.gz. the problem is : we have 12 servers. every time. I need to login 12 server and do the same job 12 times.:mad: master server ... (2 Replies)
Discussion started by: chinesefish
2 Replies

5. Linux

Linux Device Driver: avoid mem copy from/to user/kernel space

I recently started working with Linux and wrote my first device driver for a hardware chip controlled by a host CPU running Linux 2.6.x kernel. 1. The user space process makes an IOCTL call with pointer to a user memory buffer. 2. The kernel device driver in the big switch-case of IOCTL,... (1 Reply)
Discussion started by: agaurav
1 Replies

6. Shell Programming and Scripting

howto run remotely call function from within script

Hi I have the following script : #!/bin/ksh #################### Function macAddressFinder ######################## macAddressFinder() { `ifconfig -a > ipInterfaces` `cat ipInterfaces` } ####################################################################### # # print... (2 Replies)
Discussion started by: presul
2 Replies

7. Shell Programming and Scripting

How to avoid the truncating of multiple spaces into a single space while reading a line from a file?

consider the small piece of code while read line do echo $line done < example content of example file sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the output is like sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the... (4 Replies)
Discussion started by: Kesavan
4 Replies

8. Programming

How to avoid 'No buffer space available' on C socket?

Hello everybody, Years ago i left in stand-by a project of mine where the main program was supposed to send thousands ARP frames over the socket as fast as it could; but because of a programming issue i couldn't continue it. 2 days ago I decided to solve that issue. The thing is, when the... (4 Replies)
Discussion started by: Zykl0n-B
4 Replies

9. Shell Programming and Scripting

Find not finding stuff if run remotely

Hello I'm working on script to find tomcat on all my servers. Then find out what version of tomcat is installed. Basically I want to check and see if the latest version is installed. I'm testing the script on Solaris 10. I'm also going to need it to work on RHEL and SLES. If I run the following... (7 Replies)
Discussion started by: bitlord
7 Replies

10. Shell Programming and Scripting

Run yes/no script remotely

I have this script in server2 # cat /root/yesno.sh #!/bin/bash read -p "are you sure?" -n 1 -r if $ ]]; then echo "" echo "YES" else echo "NO" fi # sh /root/yesno.sh are you sure?y YES (5 Replies)
Discussion started by: anil510
5 Replies
inputkill(1)						      General Commands Manual						      inputkill(1)

NAME
inputkill - run a command until standard input is closed SYNOPSIS
inputkill [options] <command> [arguments ...] DESCRIPTION
inputkill runs a given command until standard input is closed. inputkill passes on all file descriptors except for standard input; command is given no standard input. inputkill is useful for promptly exiting a program ran via ssh when the connection is closed. For example, ssh host inputkill sleep 60 runs the command sleep on the computer named host until either sixty seconds elapse or the ssh connection is terminated. The argument "--" disables argument parsing for all proceeding arguments; e.g. "inputkill ls -l" will pass "-l" to inputkill and run "ls", whereas "inputkill -- ls -l" will run "ls -l". OPTIONS
-V, --version Display version information. -?, --help Display a summary of command line options. SEE ALSO
ssh(1), rsh(1) inputkill is part of mswatch(1); mswatch website: http://mswatch.sf.net/ AUTHOR
Written by Chris Frost <chris@frostnet.net>. inputkill(1)
All times are GMT -4. The time now is 01:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy