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
Hi Everyone,
I have an unusual requirement. Here is where i am stuck for sometime now...
I have this text file.. lets say .. output.sql...
it has lot of entries... here below is part of the entry...
.. . . . . . . . . . . . . . . . .... (3 Replies)
Discussion started by: vivek d r
3 Replies
3. Shell Programming and Scripting
I have a large data file that I need to edit. There are lines like,
> <IDNUMBER> (ST000002)
> <SUPPLIER> (ST000002)
> <IDNUMBER> (ST000004)
> <SUPPLIER> (ST000004)
and I need to delete everything after the >, excepting the end of line.
> <IDNUMBER>
> <SUPPLIER>
> <IDNUMBER>
> ... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
4. Shell Programming and Scripting
Hello,
I want to delete all lines with given string in file1 and the string val is dynamic.
Can this be done using sed command.
Sample:
vars="test twinning yellow"
for i in $vars
do
grep $i file1
if
then
echo "Do Nothing"
else
sed `/$i/d` file1
fi
done
Using the above... (5 Replies)
Discussion started by: PrasadAruna
5 Replies
5. Shell Programming and Scripting
HI,
Im using the below commmand to delete lines having "(" at the start of a line.
sed -e '/^(/d'
But i need a command to delete lines that has only "(" in it and no other strings.
infile -
asdf
asdf
( asdf
(
asd
outfile (1 Reply)
Discussion started by: dvah
1 Replies
6. Shell Programming and Scripting
I want to delete a line between selected lines using sed:
e.g. : Between "bus" to "pins", delete lines conaining "signal" word.
Input :
bus
direction
signal new
signal old
pins
signal ok
end
Desired Output:
bus
direction
pins
signal
end (4 Replies)
Discussion started by: nehashine
4 Replies
7. Shell Programming and Scripting
Can any one help me how the sed delete only first line command (D) works.
sed -f sedcmds File.txt
In this how the sed delete only first line command (D) works to delete the blank lines appearing more than ones leaving only one blank and deleting others blanks.
While doing step by step when... (2 Replies)
Discussion started by: gwgreen1
2 Replies
8. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
9. Shell Programming and Scripting
Dear Unix users,
I have a (I think simple) question;
I have a file (out.dat) like below,
the file contains some line which include 'LOS' string.
.
LOS 46.5360 91.0220 200708.2515.4900. 5400 64 1100010
.
.
I would like to delete the points in 4th... (4 Replies)
Discussion started by: mgunduz
4 Replies
10. Shell Programming and Scripting
Hi,
Tried to look for solution, and found something similar but could not adapt the solution for my needs..
I'm trying to match a pattern (in this case "ProcessType")in a logfile, then delete that line and the 4 following lines.
The logfile looks as follows:
ProcessType: PROCESS_A... (5 Replies)
Discussion started by: Juha
5 Replies