The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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
to count the number of commented lines in a file naan High Level Programming 3 08-07-2008 09:17 PM
How to count lines - ignoring blank lines and commented lines kthatch UNIX for Dummies Questions & Answers 6 05-25-2007 02:21 AM
inittab always restarts a process which was commented out uludwig04 HP-UX 2 06-08-2006 12:10 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 3.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-01-2008
Amey Joshi Amey Joshi is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 50
Selecteing only non commented rows

Hi,

I have develop a script that will read a single line from file and do some operations.But now my problwm is that if in that file suppose 1 line is commented, then i have to ignore that line...Can anybody help me out to solve this issue? Details are:

Script:

HTML Code:
#!/bin/sh
Parmdir=/opt/home/xyz
cat $Parmdir/jobname.lst | while read line
do
some command
done
cat jobname.lst
HTML Code:
ABCD
EFGH
#AFFF
RRRRR
So in the above script i have to ignore the 3rd line.

Please help me.

Thanks In Advance!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0