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
weird behavior of grep -P pankai Shell Programming and Scripting 2 12-20-2007 05:38 PM
New Style Ralf Post Here to Contact Site Administrators and Moderators 1 06-17-2003 03:50 PM
Style not working right criglerj Post Here to Contact Site Administrators and Moderators 3 11-25-2002 04:35 PM
oops! Style Manager kristy UNIX for Dummies Questions & Answers 1 12-14-2001 06:07 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 05-16-2008
finalight finalight is offline
Registered User
  
 

Join Date: May 2008
Posts: 51
awk, sed, grep...weird style

Quote:
AutoMicro Job Request
================================
(1). Job Request Information
================================
Date of Request: 20080514 10:36 Submitted By: name
First Carrier: carrier name (612W) Date of Process: 20080514 10:36

================================
(2). Plan Summary By Connection
================================
| Previous | | Current |
Conn Total Plan Usr Prev Can Has
*some space* Vsl Voy Type Qty Qty Plan Plan Plan Plan Reason**
--- --- ---- ----- --- ---- ---- ---- ---- ------
vessel name 6113A HLDITH 23 0 0 0 23 23
**Reason: [P]: Cannot Plan Fully [O]: Not In Planning Scope [C]: No Cluster
[B]: Big Volume [I]: Band 1 HLD Connection [S]: Not Selected
[N]: No BKDN to Plan [H]: Holding Volume Too High [F]: No Feasible space

==========================================
(3). Plan Details For Connecting Carriers
==========================================
Vsl Voy Port Sz Cat Wt Block Slot Row Qty Crane OperCode ResvFor
carrier name 6113A xxxx 40 GP M U02 25 8 1 0
*some space* xxxx 40 HC M U02 25 8 1 0
*some space* xxxx 40 HC H U02 25 7 3 0
*some space* xxxx 40 HC H U02 25 8 3 0
*some space* xxxx 20 GP X U02 27 8 2 0
*some space* xxxx 20 GP M U02 27 8 1 0
*some space* xxxx 20 GP U U02 27 4 4 0
*some space* xxxx 20 GP U U02 27 5 5 0
*some space* xxxx 20 GP U U02 27 8 3 0

================================
(4). Free Space Summary
================================

my desired output is like this:

so the thing is, I only need to show every of this part out
Quote:
xxxx 40 GP M U02 25 8 1 0
xxxx 40 HC M U02 25 8 1 0
xxxx 40 HC H U02 25 7 3 0
xxxx 40 HC H U02 25 8 3 0
xxxx 20 GP X U02 27 8 2 0
xxxx 20 GP M U02 27 8 1 0
xxxx 20 GP U U02 27 4 4 0
xxxx 20 GP U U02 27 5 5 0
xxxx 20 GP U U02 27 8 3 0
but the frequency of that data is not fixed, so sometimes it may have 4 lines, or 6 lines or whatever in that file. However, the last line will always have empty space/line below it.

Last edited by finalight; 05-16-2008 at 05:07 AM..
 

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 02:06 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