Showing posts with label sed. Show all posts
Showing posts with label sed. Show all posts

Tuesday, March 1, 2022

Insert a new line at the beginning of a file

 Here's a way to add a line to the beginning of a file:


sed -i '1s!^!set timing on\n set time on\n set echo on\n!' batch1.sql_bkp

find . -type f -name '*.sql' -exec sed -i '1s!^!set timing on\n set time on\n set echo on\n!' {} \;


sed -i '1s/^/line_to_be_added\n/' file

Then, you could use the code above with find to achieve your ultimate goal:

find . -type f -name '*.js' -exec sed -i '1s/^/line_to_be_added\n/' {} \;

fnd concurrent request queues and logs update

  create table apps.fnd_concurrent_queues_oci as select * from apps.fnd_concurrent_queues; create table fnd_concurrent_requests_oci as selec...