10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Team,
Can any body help me out to get the filed position of the records post sorting using AWK programming.
Thanks in advance
Example Input:
StudentID col-1 col-2 col-3 col-4
1234 14 10 12 13
1235 10 11 12 13
1236 13 12 11 10 ... (3 Replies)
Discussion started by: Srinivasa Reddy
3 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to insert two columns in the following text. I tried awk but failed to achieve. Highly appreciate your help
DATETIME="28-Sep-2013;20:09:08;"
CONTROL="AB"
echo "Myfile.txt;11671;7824.90;2822.48"
The DATETIME will be inserted at the beginning and CONTROL will... (4 Replies)
Discussion started by: angshuman
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all !
I almost did it but got a small problem.
input:
cars red
cars blue
cars green
truck black
Wanted:
cars red-blue-green
truck black
Attempt:
gawk 'BEGIN{FS="\t"}{a = a (a?"-":"")$2; $2=a; print $1 FS $2}' input
But I also got the intermediate records... (2 Replies)
Discussion started by: beca123456
2 Replies
4. Shell Programming and Scripting
Hello,
I am trying to write a shell script that maintains the health of the passwd file. The goal is to check for duplicate usernames, UID's etc. I am able to find and sort out the UID and login names via awk (which I would like to use), but I can't figure out how to save the record field into a... (1 Reply)
Discussion started by: Learn4Life
1 Replies
5. Shell Programming and Scripting
Hi Experts,
I am new to shell scripting. Need some help in doing one task given by the customer.
The sample record in a file is as follows:
3538,,,,,,ID,ID1,,,,,,,,,,,
It needs to be the following:
3538,,353800,353800,,,ID,ID1,,,,,COLX,,,,,COLY,
And i want to modify this record in... (3 Replies)
Discussion started by: sugarcane
3 Replies
6. Shell Programming and Scripting
Hello,
For the input file, I am trying to split those records which have multiple values seperated by '|' in the last input field, into multiple records and each record corresponds to the common input fields + one of the value from the last field.
I was trying with an example on this forum... (4 Replies)
Discussion started by: imtiaz99
4 Replies
7. Shell Programming and Scripting
sample file (comma as field separators)
MessageFlow,1,BusIntBatchMgr,a
OOBEvent,1,BusIntBatchMgr,a
TaskEvents,1,,a
MTTrace,1,,a
MTWarning,,1,a
MessageFlow,1,Batch,a
OOBEvent,1,Batch,a
TaskEvents,1,,a
EAISAPIdocWizard,1,BusIntMgr,a
EAISAPBAPIWizard,1,BusIntMgr,a... (3 Replies)
Discussion started by: vrclm
3 Replies
8. Shell Programming and Scripting
Hello everyone, I've suddenly gotten very interested in sed and awk (and enjoying it quite a bit too) because of a large conversion project that we're working on. I'm currently stuck with a very inefficient process for processing text blocks. I'm sure someone here should be able to easily point out... (2 Replies)
Discussion started by: jameswatson3
2 Replies
9. UNIX for Advanced & Expert Users
Hi,
Is there any command to insert a line in between two lines?
My input data is as below:
1|ETG|63121387883|Alternate|Y
3|79.58|||GBP||
4|001137001
4|0011372
5|1021701
5|1021901
1|ETG|63121387884|Alternate|Y
3|79.58|||GBP||
4|001137001
5|1021702
5|1021802... (1 Reply)
Discussion started by: laxmi131
1 Replies
10. Shell Programming and Scripting
Dear All,
I have the following input file. I want to replace data with null values.
I/P File:
9022334455|2008-12-06 06:10:21|2|Error@@@|esoo8erp|
9024334432|2008-12-06 08:40:59|6|Error@@@|6y2o8e6r|
O/P File:
9022334455||2||esoo8erp|
9024334432||6||6y2o8e6r|
... (4 Replies)
Discussion started by: hanu_oracle
4 Replies