![]() |
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 |
| Help required with a Csh script to read data from a file | fizzme | Shell Programming and Scripting | 1 | 05-29-2008 07:30 PM |
| how to read the data from an excel sheet and use those data as variable in the unix c | Anne Grace | UNIX for Advanced & Expert Users | 1 | 03-03-2008 07:21 AM |
| How to read the configuration file from shell script | nishanth hampal | Shell Programming and Scripting | 7 | 02-27-2008 03:42 AM |
| Howto capture data from rs232port andpull data into oracle database-9i automatically | boss | UNIX for Dummies Questions & Answers | 1 | 09-23-2007 02:35 AM |
| Post Shell programming: Question about source a file and read data from the file | ccwq | Shell Programming and Scripting | 3 | 08-04-2007 10:28 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Howto read data into a shell script
Hi all,
I'm anew shell user, and want to now how to do that? i have a files that have inside few raws of names of directories, i want to read only the lins that are a dir name how to do so. the file looks like that #################################### # This is the list of dirs files # #################################### ver 1 upodate 01-01-2006 /usr /etc /usr/testing /rama i need to read only the files that start with / thanks |
|
||||
|
Any of the 2 will do
#################################### # This is the list of dirs files # #################################### ver 1 upodate 01-01-2006 /usr /etc /usr/testing /rama Code:
grep '^/' data /etc /usr/testing /rama Code:
awk '$1~"^/"' data /etc /usr/testing /rama |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|