10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.
i am using centos 7 Operating system.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
2. Shell Programming and Scripting
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
3. UNIX for Advanced & Expert Users
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
Discussion started by: Abhisrajput
4. Shell Programming and Scripting
I need to print lines in between two string when a keyword existed in those lines (keywords like exception, error, failed, not started etc).
End Edr (2 Replies)
Discussion started by: EAGL€
5. Shell Programming and Scripting
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Discussion started by: jyu3
6. Shell Programming and Scripting
I am stuck for quite sometime now. Below is a line in my file -
This line occurs only once and it is the second line.
I have to break this line into two lines from ST (bold) such that it looks like -... (5 Replies)
Discussion started by: ihussain
7. Shell Programming and Scripting
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
Discussion started by: nanchil_guy
8. Shell Programming and Scripting
I am trying to pull certain pieces of data out of a line of a file that matches a certain pattern:
The three pieces that I want to pull out of this line are the only occurrences of that pattern within the line, but the rest of the line is not consistent in each file. Basically the line is... (3 Replies)
Discussion started by: ellhef
9. Shell Programming and Scripting
I want to remove first few characthers from starting of the line till ',' Comma... which needs to be done for all the lines in the file
Expected output is
How can parse... (4 Replies)
Discussion started by: kiranlalka
10. Shell Programming and Scripting
I want to grep the line which has 'data11'.then from that line, i need to trace back and find out the immediate line which has the same timestamp of that grepped line.
Process - data
Process - datavalue - 2345
Process - data
Process - data
Process... (9 Replies)
Discussion started by: Sharmila_P