![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding Multiple Lines to Multiple Files | dayinthelife | Shell Programming and Scripting | 2 | 06-04-2008 11:50 AM |
| removing pattern which is spread in multiple lines | sabyasm | Shell Programming and Scripting | 2 | 05-13-2008 05:19 AM |
| retrieved multiple lines on multiple places in a file | dala | Shell Programming and Scripting | 8 | 03-14-2008 03:28 PM |
| spawning multiple processes spread across two files | StrengthThaDon | High Level Programming | 1 | 09-17-2007 05:03 PM |
| multiple sed commands | george_ | Shell Programming and Scripting | 5 | 03-30-2006 10:35 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Can I spread commands over multiple lines?
Below an example of what I mean. The first attempt does what I want; the second doesn't, because bash assumes a line break means the end of an individual "command unix". Is there some way that I can convince bash to parse out, eg, to the closing parenthesis?
I'm thinking this would allow for neater looking scripts, specially if there are a lot of obscure parameters being passed in with hyphens. Thanks! Code:
$ls -l #l flag gives more output insgesamt 4 drwxr-xr-x 2 hartmann users 144 2006-06-07 14:57 a drwxr-xr-x 2 hartmann users 144 2006-06-07 14:57 b -rwxr--r-- 1 hartmann users 546 2006-06-07 15:01 diffem.pl $( ls > -l # l flag gives more output > ) a b diffem.pl bash: -l: command not found $ |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|