tine
1
Hi,
I have a file with on one line a uid, and on the next line a date. I am trying to make the to into one line.
Here's an example:
koppx
20031125
kraan
20031119
sarox
20031107
And this is what i want it to be:
koppx;20031125
kraan;20031119
sarox;20031107
I have been trying by using sed, but i cannot come up with anything that works at all..
Any ideas for a shell or perl script to do the job??
Tine
witt
2
Hi !
I guess that this command will help you :
cat file_with_contents | xargs -n 2 | awk '{ print $1";"$2 }'
It worked fine in my test !
I hope help you !!!
witt
tine
3
It works perfectly!
Obrigado!
Ygor
4
If you can't do it in sed then do it in awk...
awk '{printf $0 ";"; getline; print $0}' $FILE
sed 'N;s/\n/\;/' < inputfile > outputfile