sed -i "/_use_column_stats_for_function/d" init.ora
In bash, using the double quotation marks was the only way to make this work when using a variable instead of a fixed string.
To delete a specific line number, in this case line number 7:
sed -i '7d' myfile.txt
To delete lines 7 and 8:
sed -i '7,8d' insert_data.sqlTo delete everything after a specific character, for example #:
sed -i "s/#.*//g" /tmp/autoupgrade.ora
No comments:
Post a Comment