• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

need to add a char in middle of a text file then bcp into sybase table

for simplicity sake:
am wirting a korn shell script to bcp data into a sybase table.
data is sitting in a directory and record length is 100 bytes.
i need to add 1 char to middle of file prior to bcp.
not sure what the easiest soltution is?
can i do it in the .fmt file during bcp?
or should i use awk or sed or cut/paste? if i use this i would also need to add a tab char after the new char for the bcp
0
pdadddino
Asked:
pdadddino
  • 2
1 Solution
 
pdadddinoAuthor Commented:
ended up doing
awk '{OFS = "\t"}; {print $1,$2,$3,$4,"T",$5,$6,$7,$8}' ${FILE}.tmp > ${FILE}.mod

0
 
ahoffmannCommented:
does this mean that you answered the question yourself?
0
 
pdadddinoAuthor Commented:
yes
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now