I have a configuration file that when a certain script runs in updates. I want to use sed and can't seem to get the syntax right.
A line from the configuration file looks like:
DATE=20040909 12:00:10
When the script is run I want to change the date and time, i.e. removing the previous... (7 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)
I would like to change the lines:
originalline1
originalline2
to:
originalline1new
originalline1newline
originalline2new
originalline2newline
To do this, id like to combine the commands:
sed 's/^/&new/g' file > newfile1
and
sed '/^/ a\\
newline\\
\\ (2 Replies)
Hi there, I need to be able to put the hostid of my box into a file (replacing the text "enter_hostid_here" so i tried
sed -e 's/enter_hostid_here/`hostid`/g' inputfile > outputfile
but it takes the `hostid` literally as text .....how can I get this info into the file (ideally in a single... (2 Replies)
Hello,
from the gnu sed manual, I should be able to do this:
`\(REGEXP\)'
Groups the inner REGEXP as a whole, this is used to:
* Apply postfix operators, like `\(abcd\)*': this will search
for zero or more whole sequences of `abcd', while `abcd*'
... (3 Replies)
I run awk
cat $1|awk '{print $6}'
and get a lot of results and I want results to group them. For example my result is (o/p is unknown to user)
xyz
xyz
abc
pqr
xyz
pqr
etc
I wanna group them as
xyz=total found 7
abc=total ....
pqr=
Thank (3 Replies)
Hello
I need to run some sed commands but it involves "/" in the substitute or delete, any ideas how I get round the problem.
Example:
cat file1.txt | sed -e '/</Header>/d' > file2.txt
This errors due to the forward slash before the Header text.
Thanks (3 Replies)
Hi,
I have the following script :-
#!/bin/csh -f
set var="HOST2"
sed -e 's/\(.*TRANSFER TO\).*\(usr\)/\1 "$var" \2/' tempFile
tempFile contains:
STOP TRANSFER TO HOST1 /usr/bin/myscript
1. How to use variable in the above sed command. It replaces with $var... (6 Replies)
Hi,
I've a shell that uses two sed commands to tailor a file.
sed 's/ */ /g' | sed 's/%/%%/g'
Is it possible to merge this in to a single sed?
Thanks! (2 Replies)
I have below inside a file.
11.22.33.44
user1
11.22.33.55
user2
I need this manipulated as
alias server1.domain.com='ssh user1@11.22.33.44'
alias server2.domain.com='ssh user2@11.22.33.55' (3 Replies)
Discussion started by: anil510
3 Replies
LEARN ABOUT DEBIAN
mbt
mbt(1) General Commands Manual mbt(1)NAME
MBT - Memory Based Tagger
SYNOPSYS
mbt [options]
DESCRIPTION
mbt is a memory-based tagger that can tag sequences, based on training files generated by mbtg.
OPTIONS -h or --help
show help
-s settingsfile
use a settingsfile as generated by mbtg
Or:
-l <lexiconfile>
-r <ambitagfile>
-k <known words case base>
-u <unknown words case base>
-D <loglevel>
Possible options levels are LogNormal , LogDebug , LogHeavy and LogExtreme
-e <sentence delimiter> (default '<utt>')
-E <enriched tagged testfile>
-t <testfile>
-T <tagged testfile> (default is untagged stdin)
-o <outputfile> (default stdout)
-Otimbl options
(Note: there is NO SPACE between O and the options)
<options> classifier options for both known and unknown words instance bases
K: <options> classifier options for known words instance base
U: <options> classifier options for unknown words instance base
valid timbl options are: a d k m q v w x -
-B <beamsize for search> (default = 1)
-v di
add distance to output
-v db
add distribution to output
-v c
add confidence to output
-V or --version
show version info.
-L <file with list of frequent words>
BUGS
possibly
AUTHORS
Ko van der Sloot Timbl@uvt.nl
Antal van den Bosch Timbl@uvt.nl
SEE ALSO timbl(1)mbtg(1)mbtserver(1)
2011 march 21 mbt(1)