I have a request 2 perform several functions on a file, delete columns, delete rows based on column value, and finally move around columns in the final output. Consider the following input file with 12 columns;
1. The first action I want to perform is to delete columns 1, 10, 11, and 12
2. Delete all rows where value in column 1 is not equal to US60 and column 3 is not equal to 008
3. Convert values in column 1 from US60 to A
4. Convert values in column 3 from 008 to SLP
5 Move column 8 to column 4, move column 7 to column 5, move column 4 to column 8, move column 5 to column 7, column 6 stays in the same position.
Such that the output from all this would be:
Any script or code that can help achieve this results, will be greatly appreciated.
Hello good afternoon to everyone.
I'm new to the forum and would like to request your help in handling data. I hope my English is clear.
I have a file (Dato01.txt) to contine the following structure.
# Col1 - Col2 - Col3 - Col4
Patricia started Jun 22 05:22:58
Carolina started Jun... (5 Replies)
Hello,
I have two files to be treated.
First file:
col1 col2 col3 col4
Second file:
colbis
- I try to add the unique column of the file 2 towards the file 1.
- To obtain the following result with a shell script ksh:
col1 col2 col3 col4 colbis (4 Replies)
Hi All,
I have a file like below and i have 2 questions on this (They are 3 lines starts with 01 , 02 and 03. but is
01abc333644554 234 2334535 34534535355353 sfsdf345455
353 4543 jgkg tty 7676
02cdesdfsdfsdf 234 wesdfsdf 345345 234234 234234 2342342 dfgdfg
sdfgg dgdgdg fgvfs... (6 Replies)
Hello,
How do i manipulate .csv file to this format?
Thank you very much.
Source:
john,5
marco,7
john,4
paul,3
marco,8
Output:
john,9
marco,15 (5 Replies)
Hi Guys,
I have a file that lists patches along with other information.
The patches are listed in two different formats.
One format lists the latest patch, date , installed patch
Latest Patch Date IN
148412-02 13-Sep-2012 -- X X SunOS 5.10: nss_dns patch
126206-10 ... (5 Replies)
Hello,
I would like to remove the first column of lines beginning by a character (in my case is an open square bracket) and finishing by a space (or any other delimiter).
For example:
string1 string2 string3
to
string2 string3
I found this previous topic:
... (1 Reply)
Hello,
I have a file with following contents :
WSL SRVGRP=LISTENER SRVID=2
CLOPT="-A -t -- -n 0x0002aa050a03cc65 "
RQPERM=0660 REPLYQ=Y RPPERM=0660
MIN=1 MAX=1 CONV=N
I need to print only the value in Hex i.e.... (2 Replies)
How can I print a section of each line in a text file. Eg
CODE1 XYR Test2 10319389
CODE2 XYR Test2 10319389
CODE3 XYR Test2 10319389
CODE4 XYR Test2 10319389
CODE5 XYR Test2 10319389
First thing that would be nice would a new file like, awk sed and substring may help but can't figure it... (6 Replies)
Hi, I have a csv file with a key composed by 3 columns and some other numeric fields and I need to obtain the partial amounts by some part of the key. This may be some difficult to understand, so better see an example, where my input file is:
name,surname,department,y2004,y2005,y2006... (6 Replies)