Thanks, I did define the OFS, but I don't think I have the syntax correct. I don't get a ; between the fields. Isn't that what OFS is suppose to do?
BEGIN {FS="\|" ; OFS ="\;"
printf("%-18s %-10s %-20s %-3s %-50s %-50s\n",
"company_id","start_dt", "amt_outsd", "co_cd", "Filename", "Filedate")...
yes,thank you. I think that's most of the problem. But when I run the awk script
BEGIN {FS="\|"
printf("%-18s %-10s %-20s %-3s %-50s %-50s\n",
"company_id","start_dt", "amt_outsd", "co_cd", "Filename", "Filedate")
}
NR==1 {VAR1=$0}
NR>=3{printf("%-18s %-10s %-20d %-3s %-50s...
My data looks like this. I need it to be delimited, but when I insert a field separator ms dts does not recognize it. So the awk code below I tried to make it fixed width, but ms dts does not recogonize that either. Seems like all the fields are put into one column. Thanks. The first row of...
Hi, I'm just starting to write awk scripts. In the code below I'm trying to create a fixed delimeter file so I can load it into a MS db using dts. It doesn't seem to recogonize the fixed width or field separator. Does anyone have any ideas how I can separate these fields? Thanks.
BEGIN...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.