Found 22 matching messages (0.037 seconds). Page 1 of 2.
I think this is also correct: find . -name '*.htm' -exec cp '{}' '{}'.new \; \ ... of thing, I generally use 'while read' > >> find . -type f -name \*.htm -print|while read ... be writing a small script: > > #! /bin/sh > exec sed s/old/new/ < "$1" > "$ ...
openbsd-misc - Tom Van Looy - Jun 4 2007 - 12:54
... /04 01:04, David B. wrote: > Find . -name "*.htm" -exec 'sed s/old/new/' > ... the filename to redirect the output from find(1) to, it is not seen by ... ). if you want to redirect via -exec you can do it like this: $ find . -name '*.htm' -exec sh -c 'sed s/ ...
openbsd-misc - Stuart Henderson - Jun 4 2007 - 05:35
... command is probably a sytnax error, due to unterminated -exec (add \; at the end to fix this), that apart ... invoke sed command with s/old/new/ argument). find . -name "*.htm" -exec echo '{}.new' \; should do what you want. -- almir
openbsd-misc - Almir Karic - Jun 4 2007 - 04:14
... Don't use for loops with find results, they do not scale well ... , I generally use 'while read' >find . -type f -name \*.htm -print|while ... a small script: #! /bin/sh exec sed s/old/new/ < "$1" ... .new and using find . -type f -name \*.htm -exec /path/to/ ...
openbsd-misc - Hannah Schroeter - Jun 4 2007 - 08:25
... writing a small script: > > #! /bin/sh > exec sed s/old/new/ < "$1" ... .new > > and using find . -type f -name \*.htm -exec /path/to/script {} \; > or find . -type f -name \*.htm -print0 | xargs ... 1 -r /path/to/script ...-exec sh -c 'something with $1' ...
openbsd-misc - Almir Karic - Jun 4 2007 - 12:27
... writing a small script: >>#! /bin/sh >>exec sed s/old/new/ < "$1" ... .new >>and using find . -type f -name \*.htm -exec /path/to/script {} \; >>or find . -type f -name \*.htm -print0 | xargs ... 1 -r /path/to/script >...-exec sh -c 'something with $1' ...
openbsd-misc - Hannah Schroeter - Jun 4 2007 - 12:58
... . I am using 'find' to batch file a sed search and ... problem I am having is finding the correct syntax so that ... output file. For example: Find . -name "*.htm" -exec 'sed s/old ... course isn't working. any help please? thanks. david incomex@hotmail ...
openbsd-misc - David B. - Jun 4 2007 - 03:04
... problem I am having is finding the correct syntax so > >that ... output > >file. For example: > > > >Find . -name "*.htm" -exec 'sed s/old ... t use for loops with find results, they do not scale ... I generally use 'while read' find . -type f -name \*.htm -print ...
openbsd-misc - Marc Espie - Jun 4 2007 - 08:01
... David B. wrote: > I am using 'find' to batch file a sed ... problem I am having is finding the correct syntax so > that I ... output > file. For example: > > Find . -name "*.htm" -exec 'sed s/old/ ... . Here's a solution with sh+find+sed: for file in ...
openbsd-misc - Antti Harri - Jun 4 2007 - 03:24
... , Jun 04, 2007 at 06:54:20PM +0200, Tom Van Looy wrote: >I think this is also correct: >find . -name '*.htm' -exec cp '{}' '{}'.new \; \ >-exec sed -i s/old/new/ '{}'.new \; I don't see any -i option ...
openbsd-misc - Hannah Schroeter - Jun 4 2007 - 16:30
... , Jun 04, 2007 at 06:54:20PM +0200, Tom Van Looy wrote: > >I think this is also correct: > > >find . -name '*.htm' -exec cp '{}' '{}'.new \; \ > >-exec sed -i s/old/new/ '{}'.new \; > > I don't see any -i ...
openbsd-misc - terry tyson - Jun 4 2007 - 17:37
... , Jun 04, 2007 at 06:54:20PM +0200, Tom Van Looy wrote: >> >I think this is also correct: >> >find . -name '*.htm' -exec cp '{}' '{}'.new \; \ >> >-exec sed -i s/old/new/ '{}'.new \; >> I don't see any -i ...
openbsd-misc - Hannah Schroeter - Jun 4 2007 - 18:04
... days on the > net trying to find the answer to this problem. > ... > I am using 'find' to batch file a sed search and ... the problem I am having is finding the correct syntax so > that I ... output > file. For example: > > Find . -name "*.htm" -exec 'sed s/old/ ...
openbsd-misc - Bryan Irvine - Jun 4 2007 - 03:30
> >...-exec sh -c 'something with $1' {} \; is fully safe as well. > > sh -c 'echo foo"$1"bar' baz > > -> foobar > > Seems not. > a typo, sorry, it should be sh -c 'echo foo$1bar' -- baz i am cheating tho, and have sh symlinked to bash ...
openbsd-misc - Almir Karic - Jun 4 2007 - 13:49
Hi! On Mon, Jun 04, 2007 at 07:49:08PM +0200, Almir Karic wrote: >> >...-exec sh -c 'something with $1' {} \; is fully safe as well. >>sh -c 'echo foo"$1"bar' baz >>-> foobar >>Seems not. >a typo, sorry, it should be sh -c 'echo foo$1bar' ...
openbsd-misc - Hannah Schroeter - Jun 4 2007 - 16:32
... thing, I generally use 'while read' > > >find . -type f -name \*.htm -print|while ... #! /usr/bin/perl use File::Find; sub transform { my $filename = shift; open ... s/old/new/; print $fh2 $_ } } find(sub { return unless -f $_; return ...
openbsd-misc - Marc Espie - Jun 4 2007 - 16:46
... Marc Espie
openbsd-misc - Hannah Schroeter - Jun 4 2007 - 11:28
2007/6/4, Marc Espie
openbsd-misc - Martin Schröder - Jun 4 2007 - 09:26
\> This works indeed. But better use the additional quotes around $1. Just > get used to them, because $1 could contain IFS characters. true, but in this case it doesn't really matter how shell splits words :) > >i am cheating tho, and have
openbsd-misc - Almir Karic - Jun 4 2007 - 17:45
On Mon, Jun 04, 2007 at 11:45:27PM +0200, Almir Karic wrote: > >I don't see any -i option documented in the sed manpage. > > -i on some seds (gsed, ssed, FBSD sed, maybe others) means ''in > place'' edit, that feature can be reimplemented with ''sed
openbsd-misc - Marc Espie - Jun 4 2007 - 18:19