Dall_E
1
Hi,
I need help with a maybe total simple issue but somehow I am not getting it.
I am not able to etablish a sed or awk command which is adding to the first line in a text and removing only from the last line the ",".
The file is looking like follow:
TABLE1,
TABLE2,
.
.
.
TABLE99,
In the end it should look like follow:
TABLE=TABLE1,
TABLE2,
.
.
.
TABLE99
I am thankfull for any help.
I am working with ksh
cgkmal
2
Hi enjoy,
Please try with this:
sed '1s/^/TABLE=/' inputfile | sed '$s/,//'
Hope it helps.
Dall_E
3
Great it works, thx for fast answer!
Warning : UUoC !!!, please use:
sed '1s/^/TABLE=/;$s/,$//' file
Dall_E
5
it didn�t work completly, the "$" was to much after the ","
I changed it from
sed '1s/^/TABLES=/;$s/,$//' EXP_tmp.par > EXP.par
too
sed '1s/^/TABLES=/;$s/,//' EXP_tmp.par > EXP.par
thx for the reply !
regards
sandra