10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
In my script, some command return :
q | kernel-default | package | 3.19.0-1.1.g8a7d5f9 | x86_64 | openSUSE-13.2-Kernel_stable_standard
| kernel-default | package | 3.19.0-1.1.g8a7d5f9 | i586 | openSUSE-13.2-Kernel_stable_standard
| kernel-default ... (3 Replies)
Discussion started by: jcdole
3 Replies
2. Shell Programming and Scripting
awk , sed Experts,
I want to remove first and last line after pattern match "vg" :
I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data.
- So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Discussion started by: rveri
5 Replies
3. Shell Programming and Scripting
Hi How Are you?
I am doing fine!
I need to go now?
I will see you tomorrow!
Basically I need to replace the entire line containing "doing" with a blank line:
I need to the following output:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance.... (1 Reply)
Discussion started by: sags007_99
1 Replies
4. Shell Programming and Scripting
Hi,
I want to match a line which exists in a file. I have written a test script similar to below -
The content of the file file.txt would be like this -
/usr/bin/1234.xcf
/usr/bin/3456.xcf
/usr/bin/7897.xcf
/usr/bin/2345.xcf
out=`sed -n '\/usr\/bin\/7897.xcf/p' file.txt 2>&1`... (3 Replies)
Discussion started by: angshuman_ag
3 Replies
5. Shell Programming and Scripting
Hello,
I want to do a simple substitution using sed but I can't find a solution. Basically, from a Apache conf file, I would like to remove everything included between the <VirtualHost> and </VirtualHost> e.g
SSLMutex file:/var/run/ssl_mutex
<VirtualHost _default_:443>
# A lot of config that... (5 Replies)
Discussion started by: RobertFord
5 Replies
6. Shell Programming and Scripting
New to sed...
Have a file foo.txt (below).
Need to replace text on 2 lines, but can only feed sed the first few characters of each line (all lines are unique).
So, in my example, I have put '$' in place of what I need to figure out how to feed the whole line.
What I have thus far:
sed -e... (6 Replies)
Discussion started by: boolean2222
6 Replies
7. Shell Programming and Scripting
the following range matching works great but i wish to add a blank line after each range result set... which i've tried and researched to no avail
MY INPUT DATA:
CURRENT CODE I'M USING:
sed -n '/*$/,/;/p' $INPUT_FILE
RESULTS I'M GETTING:
RESULT I looking to... (5 Replies)
Discussion started by: danmauer
5 Replies
8. Shell Programming and Scripting
I am searching a dhcpd.conf to find the hardware ethernet match, then once the match is found delete just the line above it. For example:
testmachine.example {
hardware ethernet 00:00:00:00:00:00;
fixed address 192.168.1.100;
next-server 192.168.1.101;
filename "linux-install/pxelinux.0";
}... (3 Replies)
Discussion started by: cstovall
3 Replies
9. Shell Programming and Scripting
Please help!
Input pattern, where ... could be any number of lines
struct A {
Blah1
Blah2
Blah3
...
} B;
output pattern
struct AB {
Blah1
Blah2
Blah3
...
};
I need help in extracting everything between { and }
if it would have been on a single line { \(.*\)} should have worked. (15 Replies)
Discussion started by: SiftinDotCom
15 Replies
10. Shell Programming and Scripting
I need to replace the line containing "STAGE_DB" with the line
"STAGE_DB $DB # database that contains the table being loaded ($workingDB)"
Here $DB is passed during the runtime.
How can I do this?
Thanks,
Kousikan (2 Replies)
Discussion started by: kousikan
2 Replies