Results 1 to 2 of 2
I downloaded webmin but in all the files the path to perl is wrong, so i made a loop script that supposed to change it, but it doesnt work. Im ...
- 10-09-2004 #1Just Joined!
- Join Date
- Jul 2004
- Posts
- 3
Sed help
I downloaded webmin but in all the files the path to perl is wrong, so i made a loop script that supposed to change it, but it doesnt work. Im using sed, but im not sure i have it setup properly cause i get this error:
Code:sed: -e expression #1, char 11: Unknown option to 's'
Thanks.Code:#! /bin/sh for i in `ls -l *.pl do sed -e 's/!# /usr/local/bin/perl /#! /usr/bin/perl' echo "$i done." done
- 10-11-2004 #2Linux Newbie
- Join Date
- Apr 2004
- Posts
- 158
Hi,
here is a working example...
But I would use this instead...Code:#! /bin/sh for i in `ls -l *.pl` do cat $i |sed 's/#!\/usr\/local\/bin\/perl/#!\/usr\/bin\/perl/' > $i echo "$i done." done
RegardsCode:perl -i -pe 's/#!\/usr\/local\/bin\/perl/#!\/usr\/bin\/perl/' *.pl
Jonas


Reply With Quote
