10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
As part of some report generation, I've written a script to fetch the values from DB. But, unluckily, for certain Time ranges(1-9.99,10-19.99 etc), I don't have data in DB.
In such cases, I would like to write zero (0) instead of empty. The desired output will be exported to csv file.
... (1 Reply)
Discussion started by: kumar_karpuram
1 Replies
2. Shell Programming and Scripting
I've a comma separated file with data below:
61401370587,505,1;0402686146,123;2387936.0;20170812
61401370587,505,2;0401296221,34;3.0;20170811
61401370587,505,5;0431169322,123;2387936.0;20170812
My requirement is to group by using 1st,2nd column . And translate the 3rd column's row data... (1 Reply)
Discussion started by: bhagat-reena
1 Replies
3. Shell Programming and Scripting
I have 1 row which contains abouts 20000 base64 string.
e.g:
/p4bdllBS8qcvW/69GUYej8nEv6gwt7UAYl0g==WZdjwTUQX9UEKsT/zWaZdQ==uI would like rearrange this file by base64 strings. So the output should be this ( 1 string in 1 row):
69GUYej8nEv6gwt7UAYl0g==
WZdjwTUQX9UEKsT/zWaZdQ==How could I do... (4 Replies)
Discussion started by: freeroute
4 Replies
4. Shell Programming and Scripting
Hi,
I am required to arrange columns of a file i.e make the 15th column into the 1st column.
I am doing
awk 'begin {fs=ofs=","} {print $15,$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14}' ad.data>ad.csv
the problem is that column 15 gets to column 1 but it is not comma separated with the... (10 Replies)
Discussion started by: seddoubt
10 Replies
5. Shell Programming and Scripting
Hi all,
I am a newbie to awk and trying to learn by doing examples.
I got stuck at this relatively simple conversion.
The start file looks like:
1 2 "t1"
1 3 "h1"
2 1 "h1"
2 2 "h2"
and I want to convert it into
1 t1:2, h1:3;
2 h1:1, h2:2;
Thanks. (9 Replies)
Discussion started by: eagle_fly
9 Replies
6. Shell Programming and Scripting
Hi
I have the input file following like this
"AIX"
"AIX 6.0"
"AIX 7.0"
"Redhat 8"
"Redhat 9"
"Redhat 5.0 Enterprise Linux"
"Sun Solaris 9"
"Sun Solaris 10",
"Sun Microsystems"
"Oracle"
.................................Like this 2000 lines
I need to convert this input into... (5 Replies)
Discussion started by: selvanraj
5 Replies
7. UNIX for Dummies Questions & Answers
Hello, I have the following problem
I have two columns with numbers arranged as follows:
x1 y1
x2 y2
....
....
x250 y250
Now I need them arranged as follows:
"string a"
x1 y1
x1 y2
"string b"
"string a"
x1 y2
x2 y2 (3 Replies)
Discussion started by: Tom46
3 Replies
8. Shell Programming and Scripting
hi!
in awk, i have a file like this:
Trace1: WRIT,Trace2: BLAN,Trace3: BLAN,
-47.2120018005371,,,39815.4809027778
-46.3009986877441,,,39815.4809027778
-46.277000427246,,,39815.4809143519
-46.7389984130859,,,39815.4809259259
-46.3460006713867,,,39815.4809259259... (10 Replies)
Discussion started by: riderman
10 Replies
9. Shell Programming and Scripting
I wrote script in bash which generates this report:
User1,admin,rep,User2,shell,path1,x1,r1
User2,admin,rep,User7,shell,path1,x1,r1
User3,admin,rep,User4,shell,path1,x1,r1
User4,admin,rep,User3,shell,path1,x1,r1
User5,admin,rep,User1,shell,path1,x1,r1
User6,admin,rep,User5,shell,path1,x1,r1... (6 Replies)
Discussion started by: patrykxes
6 Replies
10. Shell Programming and Scripting
I have a file that is semi-colon delimited and the column headers are always the same but the column number is totally random each time this file is generated. I don't have the skills to make a script for this so maybe someone can help.
I would like to be able to take this file which has over... (11 Replies)
Discussion started by: n3al10
11 Replies