in reply to Combine multiple lines into one line
#!/path/to/your/perl # $1 $2 $3 (shell) are in $ARGV[0], $ARGV[1] and $ARGV[2] (perl) $ARGV[2]=~ s/[\r\n]+/ /g; # Now $3/$ARGV[2] doesn't contain any newline/linefeed anymore $shellindex=1; foreach (@ARGV) { print '$',$shellindex,' ($ARGV[',$shellindex-1,']: ',$_,"\n"; ++$shellindex; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Combine multiple lines into one line
by hyliau (Initiate) on Jun 23, 2003 at 10:52 UTC | |
by hyliau (Initiate) on Jun 25, 2003 at 03:18 UTC | |
by BrowserUk (Patriarch) on Jun 25, 2003 at 04:57 UTC | |
by hyliau (Initiate) on Jun 26, 2003 at 10:25 UTC | |
by BrowserUk (Patriarch) on Jun 26, 2003 at 10:55 UTC | |
|