Prev: touch to strip extension.
Next: on Mac with Leopard need to set the .cshrc path to use GNU UNIX dev tools
From: Atropo on 3 Dec 2009 14:59 On 3 dic, 14:13, Atropo <lxvasq...(a)gmail.com> wrote: > Hi all, > > a find command feeds me with filenames and I want to touch those > filenames stripping the extension and giving new one. > > i know i can with variable ${filename%.*} have the filename without > extension but don't know how to implement on xargs. > > find | awk '{print $9}' | xargs -I 'nww' cp -p nww nww%.*.HDR > > or > > find | awk '{print $9}' | echo xargs -I 'nww' cp -p nww ${nww%.*}.HDR > > as you can imagine none of both works. how could i do this on the fly > ( i mean without create a heredocument) |