BlackCH Posted December 14, 2008 Share Posted December 14, 2008 Hello people; Im trying this line: perl -pi -e 's/^(<key>device-properties</key>)/$1."\n".`cat ~/Desktop/string.txt`/e' ~/Desktop/boot.plist To insert the efi string in string.txt file onto boot.plist, right after the '<key>device-properties</key>' line . Theres something wrong with the syntaxis and I couldnt figure out how (Im new to this). If someone can tell me what will be the right way to put this I will apreciate! thanks Link to comment Share on other sites More sharing options...
BlackCH Posted December 16, 2008 Author Share Posted December 16, 2008 I got to this: line="Inserthere" string=$(cat ~/Desktop/boot1.plist) file="User/dlow/Desktop/txt.plist" echo "cat is $string" sudo perl -pi -e 's/(^"$line")/$1."\n"."$string"/e' /$file exit 0 Now I dont get syntaxis errors but now I get 'Can't do inplace edit: FILE is not a regular file ' still need some help Link to comment Share on other sites More sharing options...
Recommended Posts