10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a shell script that is currently transferring a csv file from a server into a Teradata database table. One of the 30 or so columns is called "destination_url". In that URL there are parameters, and it is possible for those parameters to be repeated because of referring companies copying... (3 Replies)
Discussion started by: craigwg
3 Replies
2. Shell Programming and Scripting
Hi All,
I have a large dat file where each lines are pipe delimited values. I need to parse the file depending on the request. For example: sometimes I have told to remove all the values in the 7th column (this case remove values '3333' only from the first line and '3543' from the second line)... (4 Replies)
Discussion started by: express14
4 Replies
3. Shell Programming and Scripting
I am extracting a number of key/value pairs in awk using following:
awk '
/xyz_session_id/ {
n=index($0,"xyz_session_id");
id=substr($0,n+15,25);
a=$4;
}
END{
for (ix in a) { print a }
}'
I don't like this Index + substr with manually calculated... (5 Replies)
Discussion started by: migurus
5 Replies
4. UNIX for Advanced & Expert Users
Hi,
I'm getting key-value pairs in a string as follows -
0000xm7zcNDIkP888vRqGv93xA7:176n00qql||9700005405552747,9700005405717924,9700005405733788|unidentified,unidentified,unidentified
I need output as follows -
row1:... (5 Replies)
Discussion started by: sumoka
5 Replies
5. Shell Programming and Scripting
Hi
I have a text file called 'fileA' which contains the follwoing line examples
01:rec1:25,50,75,100
02:rec2:30,60
03:rec3:20,40
I would like to create a new file where each of the comma separated values appears on a new line but prefixed with the first two fields e.g.
01:rec1:25... (3 Replies)
Discussion started by: mackmb
3 Replies
6. UNIX for Dummies Questions & Answers
Hi Team,
I have a requirement to print the column or find the column number of a particular string in delimited (;) file.
Ex:
aaa;bbb;ccc;rrr;mmm;
gggg;rrr;mmmm;ssss;eee;aaa;
ccc;gggg;tttt;bbbb;dddd;ggggg;rrr;
my file contains 1000+ rows like above example with semicolon... (3 Replies)
Discussion started by: baskivs
3 Replies
7. Shell Programming and Scripting
Hello everyone
I have a csv file organized just like in the following example:
col1,col2,col3,CODE_0, ... , colN
col1,col2,col3,CODE_0, ... , colN
col1,col2,col3,CODE_1, ... , colN
col1,col2,col3,CODE_1, ... , colN
col1,col2,col3,CODE_1, ... , colN
col1,col2,col3,CODE_2, ... , colN... (7 Replies)
Discussion started by: yomaya
7 Replies
8. Shell Programming and Scripting
Hi
I am trying to figure out the best way to search a long log file and print out certain information.
For example if I had a line in a log file delimited by ampersand
first_name=mike&last_name=smith&zip_code=55555&phone=555-5555&state=ma&city=boston
and I only wanted to search for and... (3 Replies)
Discussion started by: mstefaniak
3 Replies
9. Shell Programming and Scripting
Hello,
I have property file with key value pairs separated by pipe , I am trying to write a script which reads the property file and search and print value of specific key. I tried with Sed, I am successfull.
The file is as follows
... (4 Replies)
Discussion started by: ANK
4 Replies
10. UNIX for Dummies Questions & Answers
I have file with multiple columns. Column values for a record may be same.
Now i have to replace a column value(this can be same for the other columns) with new value.
File.txt
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D... (1 Reply)
Discussion started by: ksailesh
1 Replies