Sponsored Content
Top Forums Programming Foreground sesu SSH with here document Post 302631577 by neutronscott on Friday 27th of April 2012 01:11:06 PM
Old 04-27-2012
You're just having problem to pass parameters to shell. If you give -s then the shell expects script from stdin, and will take your arguments:

Code:
[mute@geek ~]$ ssh mute@localhost "/bin/sh -s -- 'Hello World' 'this is mute'" <<'EOF'
printf 'Arg: %s\n' "$@"
EOF

mute@localhost's password:
Arg: Hello World
Arg: this is mute

This User Gave Thanks to neutronscott For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute SAS Foreground

Hi, I am executing the SAS program using Unix script to call SAS program, but i would like to run that SAS program in forground mode, does anyone know what is command. Thanks in advance!! (0 Replies)
Discussion started by: terala
0 Replies

2. Shell Programming and Scripting

how to get background job to foreground

hi, i am just wondering that wen we give the following code we make a process run in background...can the viceversa be performed?i.e can this be made foreground again # sleep 75& 21751 # (4 Replies)
Discussion started by: sandilya
4 Replies

3. Shell Programming and Scripting

ssh and here document

Hi :) how can I use here doc to use ssh? I am facing a problem with the below script: #!/bin/bash ssh hosein@localhost << * 123456 * "123456" is my password Thanks (2 Replies)
Discussion started by: htabesh
2 Replies

4. Shell Programming and Scripting

Background and Foreground of a process within a script

I'm not sure if it is even possible but I figured if it was someone here would know how to do it... I am running a script which starts a bunch of processes in the background but there is one process I would like to bring back to the foreground when complete. Unfortunately the process that I... (2 Replies)
Discussion started by: ctruhn
2 Replies

5. UNIX for Dummies Questions & Answers

bringing a process to the foreground

If i have a single file i would just press fg but if i have multiple files running in the backgound and want to bring a specific one to the foreground how would i do that? Thanks!! (1 Reply)
Discussion started by: JamieMurry
1 Replies

6. UNIX for Advanced & Expert Users

Bringing a nohup process to foreground

Hi, I have used nohup command to run a process in background. i ran successfully and i exit from that terminal. But when i login for the next time I am not able to see the process but it is working, since I am getting a e-mail alert for error issue. Please let me know how to bring that process... (3 Replies)
Discussion started by: mbguy
3 Replies

7. Shell Programming and Scripting

Here document inside a here document?

Can we use a here document inside a here document? Something like this ssh user@remotehost << REMOTE sudo vserver vsernamename enter << VSERVER perform actions on vserver. VSERVER REMOTE (6 Replies)
Discussion started by: mnanavati
6 Replies

8. Programming

Background SSH using here document

I'm trying to use Here documents to pass several commands to a remote server over SSH. However I'm having problems. The code is as follows: nohup ssh $i_hostname exec /usr/bin/ksh -s << EOF >> $AS_STOPSAP_LOG & echo $i_instname; ps -ef | grep name | grep ${i_instname} |grep -v grep ... (4 Replies)
Discussion started by: doonan_79
4 Replies

9. Shell Programming and Scripting

ssh uses here-document problem

I try to ssh uses bash script in here-document like this. ssh root@$SERVER <<EOF if ; then service httpd start fi exit EOF But got an error below. maybe the if command causes the problem. Thanks for help. (2 Replies)
Discussion started by: muffle
2 Replies

10. Shell Programming and Scripting

Automatic logon via PUTTY and sesu -

Hi, I need to write a script to automate the logon via putty with Sesu-. can someone help me? thanks in advance (1 Reply)
Discussion started by: austrold
1 Replies
rootv(1)						      General Commands Manual							  rootv(1)

NAME
rootv - display TV using the Xvideo extention SYNOPSIS
rootv [ options ] DESCRIPTION
rootv puts a video to some window. By default it creates its own window, but you can also ask it to use the root window (thus the name) or any other window. rootv needs the Xvideo extention. rootv itself provides no way to control video/audio/tuner. You can use v4lctl to do this. OPTIONS
rootv knows a number of command line options to modify the behaviour. -help Print a short description of all command line options. -verbose Be verbose. That will dump some debug messages to stderr. -root Put the video onto the root window instead of creating a new window. -id <win> Put the video into the window <win> instead of creating a new window. -station <st> Tune station <st>. This just calls v4lctl, which in turn will look up the station in your ~/.xawtv config file. -no-mute Don't toggle mute. By default rootv will unmute the TV card when it starts and mute it on exit. It does this using the XV_MUTE attribute (if available). -port <n> Use Xvideo port <n>. Try the -verbose switch if you want to know which ones are available. -bg Fork into background. -wm Print WindowMaker menu (set stations using v4lctl). SEE ALSO
xawtv(1), fbtv(1), v4lctl(1) AUTHOR
Gerd Knorr <kraxel@bytesex.org> COPYRIGHT
Copyright (C) 2000-2002 Gerd Knorr <kraxel@bytesex.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (c) 2000-2002 Gerd Knorr rootv(1)
All times are GMT -4. The time now is 05:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy