![]() |
|
|
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 |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 03:00 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| how to "remsh" from a Unix machine to a Linux or SunOS | elthox | UNIX for Dummies Questions & Answers | 2 | 10-09-2007 10:22 PM |
| Avoid "++ requires lvalue" Error in Loop Calculation | sandeepb | Shell Programming and Scripting | 3 | 09-24-2007 08:02 AM |
| How to combine "find" command in for each loop (tcsh) | umen | Shell Programming and Scripting | 3 | 08-22-2005 05:07 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
remsh newhost "for loop"
Hi,
In ksh how can I execute something like this: remsh newhost "for i in 1 2 3 4 5 do echo file$i; cat file$i; done" I cannot pass the contrl J or enter in th above line which is required by the for loop. Thanks... |
|
||||
|
Code:
remsh newhost "for i in 1 2 3 4 5 ; do echo file$i; cat file$i; done" The ^J character is not required for the 'for' loop. Note the semicolon I have inserted between the '5' and the 'do' part of your statement. You could insert the ^J character, though. First, do a "set -o vi", to use 'vi' style command editing. ( I recommend some familiarity with 'vi' before you do this. ) Then, in your command, press <ctrl>+v , <ctrl> + j . That should insert the newline character. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|