10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I want to add a new column 'current_time stamp' in my existing csv file with current time stamp for all the records.I tried something this but this is printing 0 with date & time and printed date one line above header.Please help
awk -F "," 'BEGIN{ OFS="," } {$6=system("date... (5 Replies)
Discussion started by: netdbaind
5 Replies
2. Shell Programming and Scripting
Good evening
I have the below requirements, as I am not an experts in Linux/Unix and am looking for your ideas how I can do this.
I have file called file1 and file2.
I need to get the second column which is text1_random_alphabets and find that in file 2, if it's exists then print the 3rd... (4 Replies)
Discussion started by: mychbears
4 Replies
3. Shell Programming and Scripting
Input File 1
cat S1.txt
MI0043 2731 miR-1
Input File 2
cat S4.txt
MI006 310 CiR-1
MI057 10 CiR-24
MI750 5 CiR-24
Desired Output File 1
cat S1.txt.out
MI0043 2731 miR-1 S1.txt
Desired Output File 2
cat S4.txt.out
MI006 310 CiR-1 S4.txt (3 Replies)
Discussion started by: perl_beginner
3 Replies
4. Shell Programming and Scripting
Hi All,
I have a file with 3 millions records in which 3rd column is same throughout say its value is 0 throughout.for example:
Col1 Col2 Col3 Col4
A 1 0 5
B 2 0 6
C 3 0 7
D 4 0 9
I want my output as :
Col1 Col2 Col3 Col4
A 1 ... (4 Replies)
Discussion started by: Pinky456
4 Replies
5. Shell Programming and Scripting
Hi,
I have a data file with :
01/28/2012,1,1,98995
01/28/2012,1,2,7195
01/29/2012,1,1,98995
01/29/2012,1,2,7195
01/30/2012,1,1,98896
01/30/2012,1,2,7083
01/31/2012,1,1,98896
01/31/2012,1,2,7083
02/01/2012,1,1,98896
02/01/2012,1,2,7083
02/02/2012,1,1,98899
02/02/2012,1,2,7083
I... (1 Reply)
Discussion started by: himanish
1 Replies
6. Shell Programming and Scripting
I have two files which has one column comman in them.
The two files has exact same number of rows in the same sequence.
I want to add the second column of Users_detail_servicesonly.txt as last column in the existing file.
1) Users_detail_complete.txt
V0135 Memb Info ... (4 Replies)
Discussion started by: Sanjeev Yadav
4 Replies
7. Ubuntu
Hi All
I need to add a column on my existing data file. I know similar posts are there but none of them were meeting my requirement. My input is
1.20 3.44 4.88
5.11 4.99 3.22
1.89 3.89 2.90
Desired output
1 1.20 3.44 4.88
2 5.11 4.99 3.22
3 1.89 3.89 2.90
I will... (2 Replies)
Discussion started by: mahbub03
2 Replies
8. Shell Programming and Scripting
Hi All ,
Kindly help me with this soln
awk '{printf "%s %7s \n", $1,$c}' infile
where
value of variable c I am externally giving input
But executing the above command shows all the columns of infile where as I want only 1st column of infile and 2nd column should print value c (8 Replies)
Discussion started by: Pratik4891
8 Replies
9. Shell Programming and Scripting
Hi guys,
Please help me if u have some solution.
I have a file with three columns separated by ':' -
INPUT_FILE
C416722_2 : calin Dirigent : Dirigent
AC4174_6 : Jac : cal_co
TC4260_5 : [no : lin kite
BC426302_1 : [no : calin Dirigent lin
JC426540_3 : lin Pymo_bin : calin
TC428_3 : no7... (4 Replies)
Discussion started by: sam_2921
4 Replies
10. Shell Programming and Scripting
With the help of this forum, I have a script with the following output:
chr7 27104483 27105154
chr7 27106872 27110789
chr7 27111956 27112830
chr7 27114388 27125180
chr7 27126966 27131260
chr7 27135440 27137796
which was created by the following script:
awk '1 == NR || $NF >= 1000 {... (6 Replies)
Discussion started by: awknerd
6 Replies