May 19, 2003 #1 steenb Technical User Apr 25, 2001 31 DK hi I want to edit as a part of a find command : find . '*.sql' -exec sed -e 's/abc/dce/' {} \; but this just std outputs the changed lines. is a commandfile and ed best option instead of sed or is there an easier way to do this ? TIA SteenB
hi I want to edit as a part of a find command : find . '*.sql' -exec sed -e 's/abc/dce/' {} \; but this just std outputs the changed lines. is a commandfile and ed best option instead of sed or is there an easier way to do this ? TIA SteenB
May 20, 2003 #2 DSMARWAY Technical User Jun 25, 2002 640 GB hi , you can do something like this :- for i in `ls *.sql` do sed -e 's/abc/dce/' < $i >$i.$$ done creates new file with changes in $i.$$ ( $$ pid number) HTH Upvote 0 Downvote
hi , you can do something like this :- for i in `ls *.sql` do sed -e 's/abc/dce/' < $i >$i.$$ done creates new file with changes in $i.$$ ( $$ pid number) HTH
May 21, 2003 Thread starter #3 steenb Technical User Apr 25, 2001 31 DK fine idea the `ls *.sql` could also be my find or anything else for that sake. thx SteenB Upvote 0 Downvote