10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
2. UNIX for Beginners Questions & Answers
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
Greetings. I am facing some troubles and hope that the professionals here could help me.
I am handling a large dataset, and part of it is like below:
1 ab139 0 752566 G A
1 ab151 0 846808 T C
1 ab142 0 854250 G A
1 ab061 0 861808 A G
1 ab043 0 873558 T G... (4 Replies)
Discussion started by: Amanda Low
4 Replies
4. Shell Programming and Scripting
Is there an awk script that can easily perform the following operation?
I have a data file that is in the format of
1944-12,5.6
1945-01,9.8
1945-02,6.7
1945-03,9.3
1945-04,5.9
1945-05,0.7
1945-06,0.0
1945-07,0.0
1945-08,0.0
1945-09,0.0
1945-10,0.2
1945-11,10.5
1945-12,22.3... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
5. UNIX for Dummies Questions & Answers
can you please tell me
(1) how to delete 1st and 3rd line only from a file.
(2) How to delete last 4 lines in a file that has 2 blank lines out of last 4 lines.
Thank you. (2 Replies)
Discussion started by: Ariean
2 Replies
6. Shell Programming and Scripting
Hi,
For my reuirement, I have to read a file from the 2nd line till the last line<EOF>.
Say,
I have a file as test.txt, which as a header record in the first line followed by records in rest of the lines.
for i in `cat test.txt`
{
echo $i
}
While doing the above loop, I have read... (5 Replies)
Discussion started by: machomaddy
5 Replies
7. Shell Programming and Scripting
Hi,
I have a input file with the following entries:
1one
2two
3three
1four
2five
3six
1seven
1eight
1nine
2ten
2eleven
2twelve
1thirteen
2fourteen
The output should be: (5 Replies)
Discussion started by: supchand
5 Replies
8. Shell Programming and Scripting
Hi,
I have a input file with the following entries:
1one
2two
3three
1four
2five
3six
1seven
1eight
1nine
2ten
The output should be
1one
2two
3three
1four
2five
3six (2 Replies)
Discussion started by: supchand
2 Replies
9. UNIX for Dummies Questions & Answers
does anyone have an awk one-liner to:
print the first line, the second line, then every Nth line, and the last line of a file.
Thanks,
Kenny. (5 Replies)
Discussion started by: kenneth.mcbride
5 Replies
10. UNIX for Dummies Questions & Answers
I have a comma-separated record and I'd like to use sed to pull the Nth record from it.
It seems like it'd need to be something like this: sed -n 's/'"\,$1\,"'/&/p'
Am I close? (3 Replies)
Discussion started by: doubleminus
3 Replies