Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

cp file with a filter



Hi


I want to copy a file to various subdirectories while changing a value in the 
file on the fly

eg 
cat init.php | sed s/flag=2/flag=3/ > dir3/init.php
cat init.php | sed s/flag=2/flag=4/ > dir4/init.php

where there is a relationship between the directory name and flag value
(I know I could extract the number of the directory using the php)

But any zsh way of doing this?


-- 
zzapper
http://zzapper.co.uk/ Technical Tips



Messages sorted by: Reverse Date, Date, Thread, Author