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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bash. convert mpeg adts to normal mp3 stahoo23 Shell Programming and Scripting 5 05-18-2008 02:26 AM
what are some different commands in c shell and korn shell?? EquinoX UNIX for Dummies Questions & Answers 1 01-28-2008 09:14 PM
bourne shell or korn shell? XZOR UNIX for Dummies Questions & Answers 2 10-05-2006 11:34 PM
How to Convert scientific notation to normal ? maheshsri Shell Programming and Scripting 2 01-05-2006 10:33 AM
KORN Shell - Spawn new shell with commands frustrated1 Shell Programming and Scripting 2 04-20-2005 11:23 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #15  
Old 11-22-2005
Registered User
 

Join Date: Sep 2005
Posts: 74
well i do get the sliding abc...
my text files is actually spooled out from the database table which is like this

Text_abc

--------------------------------------------------

abc

abc

abc


thats why i want to delete away the first 3 lines...and only want the abc.
i not sure or maybe i guess it is because there is an empty line after each abc..thats why i have the sliding manner...can you help me?
Reply With Quote
Forum Sponsor
  #16  
Old 11-22-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
ok, how about this:

Code:
#!/bin/sh
home=c:/..../
input=$1

nawk 'FNR > 3 && NF {printf("%s%c", $0, OFS)}END{print ""}' "$1"  > "$1".out &&
mv "$1".out "$1"
Reply With Quote
  #17  
Old 11-22-2005
Registered User
 

Join Date: Sep 2005
Posts: 74
i still get the sliding manner............signed...

hi..i have upload my textfile...
hope you guys can help...thanks...

Last edited by forevercalz; 11-22-2005 at 10:46 PM.
Reply With Quote
  #18  
Old 11-22-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
Quote:
Originally Posted by forevercalz
i still get the sliding manner............signed...

hi..i have upload my textfile...
hope you guys can help...thanks...
I don't know what to tell you.... I get the desired result [undet Solaris 8].

Maybesomeone else will have better ideas... sorry.
Reply With Quote
  #19  
Old 11-22-2005
Registered User
 

Join Date: Sep 2005
Posts: 74
well its ok......thanks for your help! vgersh99...thanks for spending time helping me do all this.........it is very much appreciated...
Reply With Quote
  #20  
Old 11-22-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
Quote:
Originally Posted by forevercalz
i still get the sliding manner............signed...

hi..i have upload my textfile...
hope you guys can help...thanks...
well.... that's quite a different file....... doesn't jive with your original description. Everything appears on the SAME line/record....

Code:
#!/bin/sh
home=c:/..../
input=$1
#sed '1,3d' $input > $1.out

nawk 'FNR > 3 && NF {for (i=1; i<= NF; i++) printf("%s%c", $i, (i==NF) ? "\n" : OFS' "$1"  > "$1".out && mv "$1".out "$1"

Last edited by vgersh99; 11-22-2005 at 11:15 PM.
Reply With Quote
  #21  
Old 11-22-2005
Registered User
 

Join Date: Sep 2005
Posts: 74
Wow! once again..thanks so much! thank you!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:52 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