The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
AWK - if last line/record do something PacificWonder Shell Programming and Scripting 3 06-05-2008 11:13 PM
Need to serach if a new line character exists on the last line in a file sunilbm78 UNIX for Dummies Questions & Answers 10 02-29-2008 02:15 PM
Showing an extra record/line srivsn Filesystems, Disks and Memory 1 05-06-2006 09:35 AM
Finding character position in file dhananjaysk Shell Programming and Scripting 5 03-23-2006 11:49 AM
how to extract last line in record bjorb Shell Programming and Scripting 7 10-18-2005 02:12 AM

 
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 Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-17-2007
bsandeep_80 bsandeep_80 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 122
Finding a character in first line of a record

HI,

I am pretty new to Unix scripting. I will need help in Finding a character in first line of a file or a set of files.

The scenario is as follows:

Lets consider a set of files which is having a character "ID"(without quotes) in the first line of each file.I need to find this character in the first line of each file and if the result of this is positive then i have to say echo"ID found in file" otherwise echo "ID not found in the file"

Can anyone help me with this. I will be very Gratefull

Thanks,
Sandy
 

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 03:55 PM.


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