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

Posted on 2005-05-03
Last Modified: 2010-04-21
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
Question by:pdadddino

    Author Comment

    ended up doing
    awk '{OFS = "\t"}; {print $1,$2,$3,$4,"T",$5,$6,$7,$8}' ${FILE}.tmp > ${FILE}.mod

    LVL 51

    Accepted Solution

    does this mean that you answered the question yourself?

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
    My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (, discussed installing the Solaris Operating S…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Video by: Phil
    This video goes over how to configure and start a jail in FreeBSD.  This video is meant to supplement the article included with this course.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now