9 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
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
3. UNIX for Beginners Questions & Answers
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
4. Shell Programming and Scripting
Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool.
Wraper script am trying is to do with above metion 2 files.
utility tool accepts :
a. userinfo file : which contains username
b. item file : which... (2 Replies)
Discussion started by: Optimus81
5. Shell Programming and Scripting
I want to read a live log file line by line and considering those line which start from time stamp;
Below code I am using, which read line but throws an exception when comparing line that does not contain error code
tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Discussion started by: ketanraut
6. Shell Programming and Scripting
I need some help. I would like to read in a text file.
Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01.
Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
7. Shell Programming and Scripting
I know how to read a file line by line. But don't to how to skip to a line matching a criteria and then continue reading it till the end.
This is a log file. The input is a timestamp.
1. Find the timestamp in the log file
2. Read the remaining lines one at a time till EOF.
How can I do... (9 Replies)
Discussion started by: avinthm
8. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
9. Shell Programming and Scripting
I am a beginner in shell scripting. I have written the following script, which is supposed to process the while loop for each line in the sid_home.txt file. But I'm getting the 'end of file' unexpected for the last line. The file sid_home.txt gets generated as expected, but the script... (6 Replies)
Discussion started by: sagarparadkar