07-13-2004
Try
sed -e 's/^2\trunning/2\tfailed/' < testfile
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file that I would like to translate using sed.
I can do some basic sed commands, but Im afraid this level is beyond me.
I have this file -
...alter...
..
...65536...
...
...65536...
...
...alter...
...
...65536...
etc
What I would like to do is replace the first... (11 Replies)
Discussion started by: one_ring99
11 Replies
2. Shell Programming and Scripting
Hi
Can anyone provide me the replacement of sed with xargs perl syntax for the below
sed -e :a -e '/;$/!N;s/\n//; ta' -e 's/;$//'
This should be without looping has to take minimal time for search (0 Replies)
Discussion started by: dbsurf
0 Replies
3. Shell Programming and Scripting
Hi all,
Thanks in advanced.
This question really bothered me much. What i want is to replace any times of repeated 'TB' to 'T', below is example.
It can be fullfil by AWK and perl, but my desire is using SED to realize it.
So here means we treat TB as a whole part, which means 's/TB*/T/'... (4 Replies)
Discussion started by: summer_cherry
4 Replies
4. Shell Programming and Scripting
I need to search and replace a particular string in a file. Only the exact match of the string should be replaced.
eg: File contents : abc abcd abcdef
--> Replace only 'abc' with 'xyz', but it should not replace abcd with xyzd.
So the o/p should be: xyz abcd abcdef.
How can this be done? I... (5 Replies)
Discussion started by: sngk
5 Replies
5. Shell Programming and Scripting
This seems like it should be an easy problem, but I'm a noob and I can't figure it out. I'm trying to use sed, but would be happy to use anything that does the job.
I am trying to trim off a fixed number of unknown characters from 2 different : delimited fields while keeping the intervening... (4 Replies)
Discussion started by: helix_w
4 Replies
6. Shell Programming and Scripting
I am trying to replace the line which has string "tablespace" not case senstive....
with below simple script: mysrcipt.sh
sed "s/.*/TABLESPACE USERS/g" create_table > tmp
mv tmp create_table
Is there any better way to do it? If Search string tooooooo long it will be tough to code in... (4 Replies)
Discussion started by: ganeshd
4 Replies
7. Shell Programming and Scripting
Hi,
i have a file with lines,
file.txt
-------
test is fun
testing is better
I need to replace 'test' to 'develop' and i used,
a=test
b=develop
sed "s,$a,$b,g" -------- but i see the word 'testing' is also replaced. Need some solution. Is there any way i could replace only 'test' ? (4 Replies)
Discussion started by: giri_luck
4 Replies
8. Shell Programming and Scripting
Hi All,
I am facing a problem while using SED in Linux.
I have a property file which contains a string
local.mds.dir=${basedir}/deployCompositesIt has be to replaced with another string, and value of that string should be initialized at runtime. So I use placeholder there. My substituted... (2 Replies)
Discussion started by: bhaskar_m
2 Replies
9. Shell Programming and Scripting
Hi
,"environment":"accent-release","build":"ac-1112_c_Alph_Nop-release_rele-1112_c_Alph_Nop-release_rele","tags":""
above is the config file, where in i want to replace value after build inside the double quotes... that value i'll be passing as parameter
for example if m passing
... (1 Reply)
Discussion started by: nikhil jain
1 Replies
10. Shell Programming and Scripting
Hello,
I'm using Bash and Sed to replace text within a text file (1.txt) twice in one script. Using a for loop I'm initially replacing any 'apple' words with the variable 'word1' ("leg). I'm then using another for loop to replace any 'apple' words with the variable 'word2' ("arm"). This task is... (2 Replies)
Discussion started by: Flip-Flop
2 Replies
LEARN ABOUT DEBIAN
gpiv_process-chain
GPIV_PROCESS-CHAIN(1) General Commands Manual GPIV_PROCESS-CHAIN(1)
NAME
gpiv_process-chain - Processes a pipe of Gpiv-tool command's.
SYNOPSIS
gpiv_process-chain [-af string] [-h | -help] [-n | -none] [-c | -clean] [-fik] [-p | -print] [-pf -string] [-proc_*] [-t format] [-v |
-version] filename
DESCRIPTION
Gpiv_process-chain processes a pipe of gpiv commands. Image evaluation/interrogation with gpiv_rr is always included, image recording may
be prepended before interrogation, validation and post-processes may be appended to the chain. The filename represents the name of the
image to be evaluated. The file naming conventions are idententic to the output of the individual Gpivtools programs: in case the output
are (validated/scaled) PIV data, the data will be directed to filename.piv, with -proc_vorty the output will be called filename.vor, with
-proc_nstrain the output will be called filename.nstr and, finally, with with -proc_sstrain the output will be called filename.sstr.
This program does not use the parameter resources from libgpiv.
Options
-af string Append string to file-base name.
-h | --help
On-line help.
-n | --none
Suppresses real execution.
-c | -clean
Cleans up: removes raw image data and header.
-fik Use fi-keyline for filtering gpiv parms from README.
-p | --print
Prints parameters, command line options and input and output filenames to stdout.
-pf string
Prepend string to file-base name.
-proc_*
Defines processes to be included in the chain. * is substituted by: imgrec, valid, scale, manipiv, flipx, flipy, revert, rot90,
rot180 and vorty or nstrain or sstrain. Vorty, nstrain and sstrain may not be used in combination with -t gpi.
-t format
Image type or format: hdf (.hdf), dav (.IMG) or a type as defined by ImageMagic's convert. Default is raw binary image (.r).
-v | --version
Prints version information to standard output, then exits successfully.
filename
Input image filename. Format may be: .r, .hdf (hdf), .IMG (davis), .png, .gif, .tif or.bmp.
EXAMPLES
invoking: 'gpiv_process-chain -proc_valid -proc_scale testfile.png' will actually perform: gpiv_rr < image.png | gpiv_errvec > testfile.piv
invoking: 'gpiv_process-chain -proc_imgrec -proc_valid -proc_scale testfile.png' will do: gpiv_recimg | gpiv_rr | gpiv_errvec | gpiv_scale
> testfile.piv
SEE ALSO
gpivtools
AUTHOR
Gerber Van der Graaf
19 Januari 2005 GPIV_PROCESS-CHAIN(1)