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
text file editing injeti Shell Programming and Scripting 26 06-04-2008 08:11 AM
Building Full-Text Search Applications with Oracle Text iBot Oracle Updates (RSS) 0 04-06-2008 02:10 AM
Text editing on iPhone using ed drewcifer UNIX for Dummies Questions & Answers 1 03-05-2008 04:15 PM
Cons: Configuration is done by editing the text-based config file ... - Techworld.com iBot UNIX and Linux RSS News 0 10-09-2007 06:10 AM
grep multiple text files in folder into 1 text file? coppertone UNIX for Dummies Questions & Answers 7 08-23-2002 11:50 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 10-19-2006
Glenn Arndt's Avatar
Anomalous Lurker
 

Join Date: Feb 2006
Location: Indianapolis, IN
Posts: 255
Quote:
Originally Posted by napolayan
Code:
#!/bin/awk -f~
cat bc|while read line
do
x=`wc -l bc|awk '{print $1}'`
for ( k=( NR + 1 ) ; k<=x ; k++ )
{
 if /$line/
 then
 sed 'k d' bc
 fi
}
done
You are defining the script as awk, but there is non-awk code in the script. Use #!/bin/sh or #!/bin/ksh or #!/bin/bash (depending on your shell).
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0