10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI All,
I am new to unix. I have a file would like to do some editing by using awk, cut and sed. Could anyone help?
This file contain 100 lines. There are one line for example:
2,"102343454",5060,"579668","579668","579668","SIP",,,"825922","035885221283026",1,268,"00:59:00.782 APR 17... (2 Replies)
Discussion started by: mimilaw
2 Replies
2. Shell Programming and Scripting
Hello dear users, here I have a script to manipulate .csv files that are like this originally:
And I need to make a script to delete certain fields. Each field is separated with a comma.
So, here is my script (at least a part of it):
Field $1 is composed of a name, and then a... (5 Replies)
Discussion started by: sr00t
5 Replies
3. Shell Programming and Scripting
I have two files which I would like to compare and then manipulate in a way.
File1:
pictures.txt 1.1 1.3
dance.txt 1.2 1.4
treehouse.txt 1.3 1.5
File2:
pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244
dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2... (1 Reply)
Discussion started by: linuxkid
1 Replies
4. Shell Programming and Scripting
hey i want to over write the fourth field of a ':' delimited file by first finding the required row by using grep.
i have done the following
cat file | grep no. | awk -F ':' { $4=count; print $1:$2:$3:$4;}
the correct values are being printed but nothin is bein added to the file..please... (5 Replies)
Discussion started by: dhe.arora
5 Replies
5. Shell Programming and Scripting
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies
6. Shell Programming and Scripting
echo "23.54" | awk '
function round(A) {
return int( A + 0.5 )
}
{
printf("%d\n",round($1));
}'> > > > > >
awk: syntax error near line 2
awk: bailing out near line 2 (2 Replies)
Discussion started by: santosh1234
2 Replies
7. Shell Programming and Scripting
we have a file File1.I have used the below code to append 'file1' to each row.it is appending 'file1' but there is 5 empty space is coming after the end of each row.i found this opening in 'vi' mode and moving the cursor on each row ...can u help me ...
File1:
E100|0|05/29/1993|0|E001|E000... (3 Replies)
Discussion started by: satyam_sat
3 Replies
8. Shell Programming and Scripting
Hello Awk Gurus,
Can anyone of you help me with the below problem. I have got a file having data in below format
pmFaultyTransportBlocks
-----------------------
9842993
pmFrmNoOfDiscRachFrames
-----------------------
NULL
pmNoRecRandomAccSuccess
-----------------------... (4 Replies)
Discussion started by: Mohammed
4 Replies
9. Shell Programming and Scripting
I have input file that is having below text
098769
178902
234678
I want to modify the input file like below.
'098769',
'178902',
'234678'
Can you please help to get this. I tried but i am not getting this. (3 Replies)
Discussion started by: awk_beginner
3 Replies
10. Shell Programming and Scripting
Hi All,
I have a file, say test.dat which is "|" separated. It has 50K records in it. One of the field in the file has the data in the format 'mm/dd/yyyy'. I need to edit the file by changing the format to 'yyyy/mm/dd' in the same field where as the rest of the data remain untouched. Please... (2 Replies)
Discussion started by: rinku11
2 Replies