I made a script,
cat $FILE | sed -e "s/^abc.*$/efg/" > $FILE
However, The contents of $FILE results in empty. If the code is
cat $FILE | sed -e "s/^abc.*$/efg/" > another_file.txt
the another_file.txt holds the correct results. If someone knows what is wrong or has solution/suggestion, please let me know.
Thank you very much.