The UNIX and Linux Forums  


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
Help for Sed Syntax problem SanjayLinux Shell Programming and Scripting 2 10-16-2007 02:52 AM
syntax problem grepping? dsimpg1 Shell Programming and Scripting 9 07-17-2007 09:48 PM
Syntax problem with Unix ftp get command mheinen HP-UX 2 02-09-2007 01:01 PM
syntax problem rajan_ka1 Shell Programming and Scripting 3 03-16-2006 10:13 AM
multiple cuts syntax problem Gerry405 UNIX for Dummies Questions & Answers 12 10-31-2005 09:23 AM

Closed Thread
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
  #1 (permalink)  
Old 03-08-2006
rajan_ka1 rajan_ka1 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 130
syntax problem

dear friends,

I have a large size file containg two fields data

like this

*** ****
122 222
***** *****
***** *****
232 233


i have file like this.

i want to remove blank lines from file .

i think awk is servive this problem

i wrote a awk command but the error is coming .

mu command is like this

awk ' $1 != /*/*/*/' file.dat > new

but this command syntax has problem

please anyone correct the syntax and let me know.
  #2 (permalink)  
Old 03-08-2006
gauravgoel gauravgoel is offline
Registered User
  
 

Join Date: Dec 2005
Location: India
Posts: 218
a workaround solution


Quote:
awk -F '*' '{print $1}' f3.txt|awk NF > new
where f3.txt is input file
tell me if you were looking for somthing else

Gaurav
  #3 (permalink)  
Old 03-08-2006
ask.jackal ask.jackal is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 24
sed '/^$/d' $filename

John Arackal
  #4 (permalink)  
Old 03-08-2006
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131

Code:
nawk 'NF' myFile

Closed Thread

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 07:47 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