Re: whats wrong with find -exec sed?



thanks so much. I tried this before, but did not place the space in front of the backslash. I just was lost in possibilities ;-)

But my first command still doesn't do what it is supposed to. files get completly empty now.

I dont care anymore. Made the changes in an texteditor (very anoying)...

But thanks anyway!

Thomas

Sybren Stuvel wrote:
tom enlightened us with:

it's me again:

this does not work neither:

# find . -iname "*.pl" -exec echo "Hello {}";
find: missing argument to `-exec'

something wrong with find?


Nope, something wrong with the command. Your shell sees ';' as a
command separator. When it sees this:

# cmd a; cmd b

It executes "cmd a" and then "cmd b". As you can see, neither command
actually "see" the ";". Because of this, you need to escape it:

# find . -iname "*.pl" -exec echo "Hello {}" \;

Sybren
.



Relevant Pages

  • Re: How to Jeep Exit a C-130 in Air Assualt
    ... A man to command the ... aircraft was always part of the nuclear security system. ... deployment was self destrution meant a lost aircraft. ... A swampland to secure as a UDT squad. ...
    (sci.military.naval)
  • Re: exec fails but re-directed stdout and stdlog is empty
    ... What is cmd set to? ... Without wrapping the segments of the command with a list and then ... You have to understand that exec takes a bunch of 'words' as arguments: ... but few MS-Windows are really as familar ...
    (comp.lang.tcl)
  • Re: How To Execute Batch File Line By Line
    ... COMMAND /C string Carries out the command specified by string, ... CMD /C Carries out the command specified by string and then terminates. ... .cmd files will NOT work on non Windows NT versions i.e. Windows 9x, ... Both .cmd and .bat files work on Windows NT versions. ...
    (microsoft.public.windowsxp.general)
  • Re: Command.Com - Sinn und Unsinn?
    ... Kompatibilität für 16-Bit-Porgs dient, dann gilt das auch ... Anforderung die ich an CMD / Command stelle! ... Ich habe seit DOS 4 "Fachwissen" um DOS - und wenn ich ...
    (microsoft.public.de.german.windowsxp.sonstiges)
  • Re: MSinfo32.exe help
    ... when i do the cmd for rd packagestore /s /q(system cant find file ... use it even though i have to use cmd to open it.this bothers me alot i defrag ... my packagestore folder didn't have any .cab files in it ... > command in case there's a problem with word wrap. ...
    (microsoft.public.windowsxp.general)