Thread: sed troubles
i having trouble sed. seems effecting rest of program, after it's part done.
code, such:
the contents of default is:code:cp "$base/default" "$base/new" while read programs; after=`grep "after: " < $base/$programs | sed 's/^after: //'` sed "/$after/ a\ $programs" $base/new done < "$base/programs" plistgenstart settings-iphone preferences while read gen; cat "$base/sections_iphone/$gen" >> "/applications/preferences.app/settings-iphone.plist" done < $base/new plistgenend settings-iphone settings preferences rm -rf "$base/new"
and content of programcode:groupcell airplanemode wifi notifications groupcell sounds brightness wallpaper groupcell general accountsettings phone safari messages ipod photos store speakers
and there file in $base called each of contents of "program", contents likecode:ch40s-launcher wintersled
or other part of "default", finds , inserts text after finds it, modifying file.code:after: store
gets stuff $base/sections_iphone has files named things in "default" contain text entered new file.
having troubles. sed works supposed to, seems cut off second loop, "$gen". gets first phew charachters, cuts off, causing cat error of "/library/stuff/sections_iphone/ai : no such file or directory" or similar.
if remove sed part, works fine, alas, cannot remove sed, needed, otherwise code pointless
suggestions?
thanks!
i'm not following logic completely, seems 'sed' command has no effect - needs have output redirected somewhere, or used -i option.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk sed troubles
Ubuntu
Comments
Post a Comment