Problem in making a script
amritpal pathak
amritpalpathak1 at gmail.com
Wed Jun 29 18:08:36 UTC 2011
Thank you very much .
it is working now.it is
replacing the user's input with line number 4's content in abc file but it
also removes the contents which are after the line number 4 i.e 5,6,7 so
on.everyline gets remove.
It is not feasible
Why?
TEMP=$(mktemp)
head -n $((4 - 1)) "abc.tex" > "$TEMP"
echo "$fname" >> "$TEMP"
LEN=$(cat "abc.tex"|wc -l)
tail -n $(($LEN - 4)) "abc" >> "$TEMP"
mv "$TEMP" "abc.tex"
amritpalpathakgne.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110629/9b39a12f/attachment.html>
More information about the ubuntu-users
mailing list