![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| system not booting after running local boot scripts | tcb3210 | Ubuntu | 0 | 05-30-2008 05:55 AM |
| mount CD from local laptop to UNIX server remotely | duke0001 | UNIX for Advanced & Expert Users | 7 | 10-31-2007 04:20 PM |
| populate variable from remote result | hcclnoodles | Shell Programming and Scripting | 2 | 02-19-2007 05:44 AM |
| Running an Interactive Program Remotely | Terrible | Shell Programming and Scripting | 3 | 10-19-2006 11:48 PM |
| running commands with remotely with Telnet | Terrible | Shell Programming and Scripting | 2 | 06-27-2006 04:47 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
running command remotely to populate local variable
If I run this
Code:
[root@central-server] # ssh remote-server 'du -sk /usr/platform/`uname -i`/' 174 /usr/platform/SUNW,Sun-Fire-V245 However, if i try to do the same but populate a local variable within my script called for example 'result' Code:
#!/bin/ksh result=`ssh remote-server 'du -sk /usr/platform/`uname -i`/'` echo $result Code:
[root@central-server] # ./test.sh ./test.sh[13]: /: cannot execute ./test.sh[13]: -i: not found Any help would be great Cheers |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|