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
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
3. Shell Programming and Scripting
I have a script which should take more than 9 command line inputs while running. Likescript.sh a s d f g h j j k l o p i u y t r e w
Now in the script if I have to access one of the input which is at position after 9, in this case say 'p' then how can I do that?
echo $12 will not work... (15 Replies)
Discussion started by: pat_pramod
4. Shell Programming and Scripting
cat file |grep -v "xx" | grep -v "yy" |grep -v "zz" (3 Replies)
Discussion started by: yanglei_fage
5. Shell Programming and Scripting
I am trying to put together a Korn Shell script to insert at a specific line.
The system we use is SunOS 5.10
I can get the line number by using:-
num=`sed -n '/export ENV/=' ./tmp.file`
Not getting much headway using the above variable's value to insert -
export SYBASE=/opt/sybase15... (5 Replies)
Discussion started by: aj8200
6. Shell Programming and Scripting
Hi guys , i need help so bad on this issue..
Basically i have to delete the line continuation symbol of first column variable and add the truncated part of that word in next line to first line.
here i written sample 3 lines but originally i have bunch of lines in that file.
client1_day- ... (3 Replies)
Discussion started by: chrismorgan
7. Shell Programming and Scripting
11;20100402;0... (4 Replies)
Discussion started by: suresh3566
8. Shell Programming and Scripting
I have a file which contains data as below
When we see no pipe character in the line. append those lines to the previous line with pipe character till we get the next line with pipe character with ~(concat with ~)
Input file looks like:
1080530944|001|john.l.bonner|Acknowledge|CN... (11 Replies)
Discussion started by: ainuddin
9. Shell Programming and Scripting
I want to echo the 15th line from a file named as abc.txt, also i want to echo only the values in that line not the line number.
Thanks in advance:) (4 Replies)
Discussion started by: tushar_tus
10. Shell Programming and Scripting
I was trying to write a miniature shell (ie, command line interpreter) to implement the features like 'IO Redirection' and 'Pipe line fileters'.
Can anyone help me with sample shell sript to implement the above features.
supong (2 Replies)
Discussion started by: supong