I am trying to use sed to delete multiple lines in a file. The problem is that I need to search for a certain line and then once found delete it plus the next 4 lines. For instance if I had a file that consisted of the following lines:
#Data1.start
(
(Database= data1)
(Name = IPC)... (1 Reply)
Trying to write a sed command that applies multiple replacements to a specific address. Need a second pair of eyes I guess cause my syntax appears to be correct (obviously not though) I am getting an error. Any Help would be appreciated! Thanks in advance.
sed -f foo envOracle
sed: Function... (2 Replies)
hello!
I have a few sed commands
sed '/^$/d' < $1 > tmp.t
sed '/^ \{3,\}/d' < tmp.t > tmp1.txt
.....
how can I write them in a single line?
sed '/^$/d' < $1 > | '/^ \{3,\}/d' < $1 > tmp1.txt
any idea?
thanks. (5 Replies)
Below an example of what I mean. The first attempt does what I want; the second doesn't, because bash assumes a line break means the end of an individual "command unix". Is there some way that I can convince bash to parse out, eg, to the closing parenthesis?
I'm thinking this would allow for... (1 Reply)
Hi all:
I have a file in which the contents are as following:
...
This is a test
ONE
TWO
Hello, world!
XXX YYY CCC
test again
three, four
five
six
seven
world
AAA BBB QQQ
test
eight, nine
world (3 Replies)
Got another sed question :)
My text block is
I need to do the following:
If (and only if) the line starting with 10002,11 is followed by a line starting with 10004,9 , insert the line 10003,9 between the 2
Thus, my output should be
I tried
but this gives me
(the order... (3 Replies)
Hi,
I want to make sed write a part of fileA (first 7 lines) to file1 and the rest of fileA to file2 in a single call and single line in sed. If I do the following:
sed '1,7w file1; 8,$w file2' fileA
I get only one file named file1 plus all the characters following file1. If I try to use curly... (1 Reply)
Hello I am hoping you may help.
I am not sure how to go about this exactly, I know the tools but not sure how to make them work together.
I have two SED commands that I would like to run in a shell script. I would like to take
the manual input of a user (types in when prompted) to be used... (4 Replies)
Let's say I have a file called test.out. In this file I want to do the following:
1. Search for DIP-10219 and with this:
2. Remove everything in front of cn=
3. Remove everything after *com
4. Remove duplicate lines
5. Replace ( with \(
6. Replace ) with \)
For 1-3 I have figured out this... (11 Replies)
Hi everybody,
I am writing a little script to manage keystores and need some help with sed.
The output of the keystore file is like:
vi 2, Dec 7, 2012, trustedCertEntry,
Certificate fingerprint (MD5): F9:1F:FE:E6:A3:CB:99:88:44:D4:67:ED:G5:F8:97:7A
system@remote-server, Dec 17, 2013,... (13 Replies)
Discussion started by: Hamss
13 Replies
LEARN ABOUT DEBIAN
pvm_hostsync
HOSTSYNC(3PVM) PVM Version 3.4 HOSTSYNC(3PVM)NAME
pvm_hostsync - Get time-of-day clock from PVM host.
SYNOPSIS
C #include <sys/time.h>
int info = pvm_hostsync( int host, struct timeval *clk,
struct timeval *delta )
Fortran call pvmfhostsync( host, clksec, clkusec, deltasec, deltausec, info )
PARAMETERS
host TID of host.
clk (or clksec and clkusec) Returns time-of-day clock sample from host.
delta (or deltasec and deltausec) Returns difference between local clock and remote host clock.
DESCRIPTION
pvm_hostsync samples the time-of day clock of a host in the virtual machine and returns both the clock value and the difference between
local and remote clocks.
To reduce the delta error due to message transit time, local clock samples are taken before and after reading the remote clock. Delta is
the difference between the mean local clocks and remote clock.
Note that the delta time can be negative. The microseconds field is always normalized to 0..999999, while the sign of the seconds field
gives the sign of the delta. For example:
3.25 Sec = 3,250000
0 = 0,0
-1 uSec = -1,999999
-1 Sec = -1,000000
-1.1 Sec = -2,999000
In C, if clk or delta is a null pointer, that parameter is not returned.
ERRORS
If pvm_hostsync is successful, it returns PvmOk. These error conditions can be returned by pvm_hostsync
PvmSysErr
pvmd not responding.
PvmNoHost
specified host not in virtual machine.
PvmHostFail
host is unreachable (and thus possibly failed)
SEE ALSO pvm_config(3PVM)
20 February, 1994 HOSTSYNC(3PVM)