10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have some data that looks like this:
PXD= ZW< 1,6
QR> QRJ== 1,2(5)
QR> QRJ== 4,1(2)
QR> QRJ== 4,2
QRB= QRB 4,2
QWM QWM 6,2
R<C ZW< 11,2
R<H= R<J= 6,1
R>H XZJ= 1,2(2)
R>H XZJ= 2,6(2)
R>H XZJ= 4,1(2)
R>H XZJ= 6,2
RDP RDP 1,2
What I would like to do is if fields $1 and $2 are... (5 Replies)
Discussion started by: jvoot
5 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I have a file as follows.
file1
Hello
Hi
His
Hi
Hi
Hungry
hi
so I want to delete identical lines while leaving one of them undeleted.
So desired output will be
Hello
Hi (2 Replies)
Discussion started by: beginner_99
2 Replies
3. Shell Programming and Scripting
Use sed to print first n lines and last n lines of an output.
For example: n=10
Can it be done?
Thanks. (7 Replies)
Discussion started by: carloszhang
7 Replies
4. UNIX for Dummies Questions & Answers
I have a file that looks like this 10 user1s, 5 user2s and 10 users3.
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.1 user1
10.10.1.2 user2
10.10.1.2 user2
10.10.1.2 user2... (7 Replies)
Discussion started by: lawsongeek
7 Replies
5. Shell Programming and Scripting
Hi all,
This should be very easy but I can't figure it out...
I have a file that looks like this:
@SRR057408.1 FW8Y5CK02R652T length=34
AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT
+SRR057408.1 FW8Y5CK02R652T length=34
FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8
@SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies
6. Solaris
Hi guys.
I need a sed command to print like 10 lines after a regular expression is found in the log.
Can anyone help me out.
Thanks
---------- Post updated at 10:52 AM ---------- Previous update was at 10:34 AM ----------
never mind.
I just did the search bewteen two expressions. (1 Reply)
Discussion started by: jamie_collins
1 Replies
7. Shell Programming and Scripting
Hello!
Im trying to read file contents. Then, print out every line that has "/bens/here" in the file that was read.
cat /my/file.now | sed '/bens/here/p'
I keep getting the error asking if I need to predeclare sed?
What does predeclaring sed mean?
Thanks!
Ben (2 Replies)
Discussion started by: bigben1220
2 Replies
8. Shell Programming and Scripting
I must admit I am relativly new to sed, and I am trying to make a simple sed query to search log files and return multiple variables from multiple logs. So far I have had success, but one problem remains:
Alot of lines in the log files wrap onto multiple lines and are not being returned as... (2 Replies)
Discussion started by: demanche
2 Replies
9. Shell Programming and Scripting
Hello Experts,
I have two files called "old" and "new". My old file contains 10 lines and my new file contains 10 + "n" lines.
The first field in both these files contain ID. I sort these two files on ID. I am interested in only the lines that are in the new file and not in old.
I tried... (4 Replies)
Discussion started by: forumthreads
4 Replies
10. Shell Programming and Scripting
I am looking to replace two or more strings on different lines using sed, but not with the same variable. IE
# cat xxx.file
<abc>
abc def ghi
abc def ghi
abc def ghi
currently I can only change each line with the same pattern:
# sed -e '/<abc>/!s/abc\(.*\)/jkl mno/' xxx.file
abc jkl mno... (3 Replies)
Discussion started by: prkfriryce
3 Replies