![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with csh script | rahulrathod | Shell Programming and Scripting | 4 | 02-21-2008 09:38 AM |
| script problem | tdavenpo | Shell Programming and Scripting | 3 | 01-04-2006 01:07 PM |
| Problem starting a script from a 'main'-script | Rakker | UNIX for Dummies Questions & Answers | 3 | 06-28-2005 05:12 AM |
| problem with a script | Lestat | Shell Programming and Scripting | 4 | 06-13-2005 09:30 AM |
| problem with ftp script...please help | vancouver_joe | UNIX for Advanced & Expert Users | 2 | 11-22-2001 04:47 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem in Script !
#!/bin/ksh
cat queue.data | \ while read line do echo "$line"\c done ---------------- In the above script , we are piping the output of cat command to \ and then we are reading each line and doing something in loop. Whats the objective or significance of using \ after | (pipe) ? Please guide me in that ! Thanks in Advance. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Quote:
|
|
#3
|
||||
|
||||
|
it's a line continuation. this can be re-written as:
Code:
#!/bin/ksh cat queue.data | while read line do echo "$line"\c done Code:
#!/bin/ksh while read line do echo "$line"\c done < queue.data |
|
#4
|
|||
|
|||
|
Thanks a lot friend !
Its been nice to get two things when asked one ! This shows knowledge increases when shared ! |
|||
| Google The UNIX and Linux Forums |