# insert header
cat some_file | sed '1i #new first line'

# edit file
sed -i '1i #new first line' some_file

echo -e "start transaction;\n$(cat xaa.sql)" > xaa.sql


# in osx
$ cat insert-sql.sh
sed -e'1i\
insert into my_table (col1, col2) values ' -e'1s/^,/ /' $1
첫줄에 insert 문장을 넣고 그 다음줄의 첫번째 쉼표를 블랭크로 replace 한다.
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2022-02-22 12:37:05
Processing time 0.0053 sec