10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello Team,
I want to delete below linux using sed command but I am getting error.sed -i '/url=/status.cgi?hostgroup=/d' 3
error:sed: -e expression #1, char 32: unknown option to `s'
Could you please help me with correct syntax.
My line contain / character because of that I am getting... (4 Replies)
Discussion started by: ghpradeep
4 Replies
2. Shell Programming and Scripting
I need to create a shell script to delete multiple items (Strings) at a time from a file.
I need to iterate through a list of strings.
My plan is to create an array and then iterate through the array.
My code is not working
#!/bin/bash -x
declare -a array=(one, two, three, four)... (5 Replies)
Discussion started by: bash_in_my_head
5 Replies
3. Shell Programming and Scripting
Ultimate goal is to delete lines from before and after a block of lines in a given file. First attempt was something like this:
sed -e '1,/STARTUP/ d' inputfile.txt > outputfile.txt
but that deleted everything down to and including the line with STARTUP. I need to delete everything before... (6 Replies)
Discussion started by: edstevens
6 Replies
4. Shell Programming and Scripting
This is a Nagios situation.
So i have a list of servers in one file called Servers.txt
And in another file called hostgroups.cfg, i want to remove each and every one of the servers in the Servers.txt file.
The problem is, the script I wrote is having a problem removing the exact servers in... (5 Replies)
Discussion started by: SkySmart
5 Replies
5. UNIX for Dummies Questions & Answers
I'm hoping someone could help me out please :)
I have several .txt files with several hundred lines in each that look like this:
10241;</td><td>10241</td><td class="b">x2801;</td><td>2801</td><td>TEXT-1</td></tr>
10242;</td><td>10242</td><td... (4 Replies)
Discussion started by: martinsmith
4 Replies
6. Shell Programming and Scripting
Hello
i have a big file with a specific format and delimiter is "§" :
§field1§$field2§$field3§$field4§$field5§$field6§$field§
in this file we have a field which are very long (more than 20000 chars !!!!)
so through vi i cant manipulate them.
despite this i managed to suppress lines that... (11 Replies)
Discussion started by: ade05fr
11 Replies
7. Shell Programming and Scripting
Hi All,
I have one /etc/hosts.equiv file which has following entries
##########
wcars42g admin
wcars42b netmgr
wcars42b oemssrvr
wcars42f admin
wcars42f netmgr
wcars42f oemssrvr
##########
I am trying to delete lines starting from wcars42b.... (1 Reply)
Discussion started by: akash_mahakode
1 Replies
8. Shell Programming and Scripting
Hi,
I have file which has the following content...
GOOD MORNING
**********WARNING**********
when it kicks from the kickstart, sshd daemon should start at last.
(WHEN KICKING ITSELF, NOT AFTER KICKING).
/etc/rc3.d/S55sshd ( run level specification for sshd is 55, now I would want to... (4 Replies)
Discussion started by: skmdu
4 Replies
9. Shell Programming and Scripting
Hi,
I have two files test1,test2. If the number in test1 file exist in test2 then i want to remove that from test2 file.
Ex:
File- test1
12
13
14
15
==============
File- test2
1A~12
2B~13
3C~33
4D~22
I want to remove row which contains 12,13 from test2. I am using this sed... (2 Replies)
Discussion started by: sai_nj
2 Replies
10. Shell Programming and Scripting
sed "/$titlesearch/d" movielist
will delete any line in the file movielist that matches $titlesearch, but this is only a screen print correct ?
how can I have sed to actually delete the line from the file so that it doesnt appear next time I open the file ?
thanks
Steffen (8 Replies)
Discussion started by: forever_49ers
8 Replies