Sponsored Content
Full Discussion: AWK or SED solution
Top Forums Shell Programming and Scripting AWK or SED solution Post 302584868 by maxoff on Monday 26th of December 2011 07:58:03 AM
Old 12-26-2011
AWK or SED solution

Hello. I have big file data like this(part of file):

Code:
....
18210102021010000110 47401000000
021001 5166891.16
021011 5166891.16
18210602010020000110 47401000000
020701 8995421.00
021001 8995421.00
021011 8995421.00
030801 .08
18210604011020000110 47401000000
020701 9048.00
021001 36217.00
021011 36217.00
030801 27382.00
18211603010010000140 47401000000
......

I need AWK or SED solution to get like this:

Code:
....
18210102021010000110 47401000000 021001 5166891.16
18210102021010000110 47401000000 021011 5166891.16
18210602010020000110 47401000000 020701 8995421.00
18210602010020000110 47401000000 021001 8995421.00
18210602010020000110 47401000000 021011 8995421.00
18210602010020000110 47401000000 030801 .08
18210604011020000110 47401000000 020701 9048.00
18210604011020000110 47401000000 021001 36217.00
18210604011020000110 47401000000 021011 36217.00
18210604011020000110 47401000000 030801 27382.00
18211603010010000140 47401000000
....

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is There a Sed Solution for This?

Hi All, I'm trying to use sed to extract data within a String, but I'm having problems with sed command: Text: STATUS OSRC_R6_0_MENT_R1H_CU M_901662 R1H_LV1_20080313 Based from the Text above, I just need to extract this data R6_0 R1H_CU LV1 Is there a solution for this in... (1 Reply)
Discussion started by: racbern
1 Replies

2. Shell Programming and Scripting

Is there a awk solution for this??

I am writing a awk script that gathers certain data from certain fields. I needed a awk solution for this, because it will later become a function in the script. I have the following data that I need output on a single line, but record spans across multilple lines and records are not... (7 Replies)
Discussion started by: timj123
7 Replies

3. UNIX for Dummies Questions & Answers

Awk/sed solution for grep,cut

Hi, From the file "example" with lines like below, I need the int value associated with ENG , i.e, 123 SUB: ENG123, GROUP 1 SUB: HIS124, GROUP 1 .. .. Normally , i do grep ENG example | cut -d ' ' -f 2 | cut -c 4-6 Is it possible to do it in simpler way using awk/sed ? ... (5 Replies)
Discussion started by: priyam
5 Replies

4. Shell Programming and Scripting

sed solution for condition checking

Hi all , Recently i came across this in FAQ's. I have a file cat rem.txt sreedhar 20 sreedhar 10 sreedhar 15 sreedhar 18 sreedhar 16 sreedhar 30 I have to replace sreedhar with "Sridhar" if the second parameter is > 18. I need to do it in "sed" only. I am wondering how this... (4 Replies)
Discussion started by: panyam
4 Replies

5. Shell Programming and Scripting

Urgent solution for simple sed

Hi Im running this command on AIX in ksh. My input file samp1 contains 1 2 123 12345 When I execute the following sed i dont get a matching pattern sed -n '/{1}/p' samp1 Can anyone help me with this simple thing (3 Replies)
Discussion started by: raghav288
3 Replies

6. Shell Programming and Scripting

Awk solution

Hello! Well, I searched and wasn't able to find a specific example of my dilemma, so hopefully someone could assist? Or maybe there was an example but I missed it? I have two files: file1 = order data file file2 = list of 65,000+ order numbers I would like to extract from 'file1' any... (5 Replies)
Discussion started by: rm -r *
5 Replies

7. Shell Programming and Scripting

sed to check two condition need solution

Hi, I am having a file in below format server-1 Win2008:server-1-1700,1774,290104720,290104987:server-1 server-2 AIX:server-2-:server-2 server-2 I want the output like this Win2008:server-1-1700,1774,290104720,290104987:standalon-server AIX:server-2-:VIO-Sever I used the... (7 Replies)
Discussion started by: ranjancom2000
7 Replies

8. Shell Programming and Scripting

sed or awk Solution

Hi I am having a csv file like this ahsh,90.82,add,32424,ahha hhdh,98.89,hdhdh,92728,neha hshs,you,97.7,hdhdhd,are,a jsjsj,wonderful,9788,79.9,aheh ahdh,95.5,girl, 2737,jolllI need to add width="100" to the value which is greater than 90 like decimal points but less than 100 Output... (5 Replies)
Discussion started by: kshitij
5 Replies

9. Shell Programming and Scripting

Solution for replacement of 4th column with 3rd column in a file using awk/sed preserving delimters

input "A","B","C,D","E","F" "S","T","U,V","W","X" "AA","BB","CC,DD","EEEE","FFF" required output: "A","B","C,D","C,D","F" "S", T","U,V","U,V","X" "AA","BB","CC,DD","CC,DD","FFF" tried using awk but double quotes not preserving for every field. any help to solve this is much... (5 Replies)
Discussion started by: khblts
5 Replies
gii_cmd_event(3)							GGI							  gii_cmd_event(3)

NAME
gii_cmd_event, gii_cmd_nodata_event - LibGII commands and information events SYNOPSIS
#include <ggi/events.h> typedef struct { COMMON_DATA; uint32_t code; } gii_cmd_nodata_event; #define GII_CMD_DATA_MAX (248-sizeof(gii_cmd_nodata_event)) typedef struct gii_cmd_event { COMMON_DATA; uint32_t code; uint8_t data[GII_CMD_DATA_MAX]; } gii_cmd_event; DESCRIPTION
These are used internally either to the application or the kernel. The same event is used for both Command and Information events. GENERATED EVENTS
gii_cmd_event is the basic structure for evCommand and evInformation events. It may need to be casted to some other structure (depending on code) to access the data. STRUCTURE MEMBERS
code The command or request code. data Provides raw access to the device and/or command specific data. The recipient must not store references to the data. If the data information is needed afterwards, copy it! DEVICE INFORMATION
One use of evCommand is to convey some capabilities of a GII device, via the GII_CMDCODE_GETDEVINFO command code. SEE ALSO
gii_event(3), gii_cmddata_getdevinfo(3) libgii-1.0.x 2006-12-30 gii_cmd_event(3)
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy