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
What the command to find out the record length of a fixed length file? tranq01 UNIX for Dummies Questions & Answers 9 12-04-2008 04:04 PM
how to convert Fixed length file to delimited file. satyam_sat Shell Programming and Scripting 7 04-03-2008 03:41 AM
use SQL loader to dump a fixed length file in to DB anumkoshy Shell Programming and Scripting 2 10-10-2007 06:53 AM
convert XML file into Text file(fixed length) ram2s2001 Shell Programming and Scripting 0 11-03-2005 01:28 AM
creating a fixed length output from a variable length input r1500 Shell Programming and Scripting 2 12-03-2003 01:09 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 Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-31-2008
dabear dabear is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 3
Question Manipulating a fixed length file w/o PERL

Greetings,

I need to take a fixed length file, similar to the following:

<input file>

1233 e 612 i
43378 f 03 x
22 17 e 9899
a 323e a6 z7

read in the character in position 6, and if that character = e, delete that line from the file.

<output file>

43378 f 03 x
22 17 e 9899

and if possible, output the deleted lines to a new "log" file.

<log file>

1233 e 612 i
a 323e a6 z7

The old file must maintain its structure, the log file wouldn't.

I'm on an AIX platform, and have sh/ksh/bash available to script in.
I'm sure it can be done with some combination of cut/sed/awk, I just haven't been able to get it right as of yet. Any help would be greatly appreciated!

Thanks in advance.
DB
 

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 05:00 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