Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] two secure questions



******    message to minivend-users from Murray Gibbins <murray@scotweb.ltd.uk>     ******

Adam Kett wrote:
> 
> Murray Gibbins wrote:

> except
> 
> > {}.tmp ; mv {}.tmp {} \

ok, as you know {} becomes the name of the found file in find. So you cat the
file, pass it through sed and save it in a temporary file. As you can't read and
edit a file at the same time. When the 'cat' has finished the tmp file  over
writes ( "mv {}.tmp {}" )the original, and find moves onto the next file.

The last '\;' is to tell find to stop '-exec'ing the exec. :) . Clear as mud.

> 
> but how do I escape MV's [ & ] in sed ?
> 

try '\[' 
as in 

[murray@handle murray]$ echo [ | sed -e 's/\[/e/'
e
[murray@handle murray]$ 



> any help will be greatly appreciated
> 
> because I am starting to tear my hear out  (which is hard with short hair)

you should see my hair :-)

( it's at http://www.morpheux.org for those that want to know)

-- 
  ____
  \__/    Murray Gibbins             murray@scotweb.ltd.uk
  /  \    Programmer
_ \__/ _  ================================================
\\ || //  Scotweb Limited,             info@scotweb.ltd.uk
 \\||//   13a Albert Terrace,    http://www.scotweb.ltd.uk
  \||/    Edinburgh EH10 5EA   Tel: +44 (0)  131 270 82 33
   ||     Scotland. Europe.    Fax: +44 (0) 7020  93 49 04
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: