![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Removing asterix (*) from flat files | ctrl_alt_del | Shell Programming and Scripting | 3 | 10-18-2007 09:29 AM |
| Compare 2 flat files | ganesh123 | Shell Programming and Scripting | 5 | 03-16-2007 02:04 PM |
| Look up column in a flat file | jambesh | Shell Programming and Scripting | 5 | 09-18-2006 05:44 AM |
| directory names in a flat file | surjyap | Shell Programming and Scripting | 2 | 10-06-2005 07:51 AM |
| Flat Files | thumsup9 | Shell Programming and Scripting | 2 | 02-02-2005 03:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Column names in flat files
Hi all,
I want to create column names in a flat file and then load the data through some other application. For example, I have a file with emp.txt and I need column names as eno,ename,sal in the first line. The delimiter here is comma and record delimiter is end of line or unix new line. Could someone help me out in this. |
|
||||
|
This is what I do
Get the column headers somehow and write them into a new file. Then append the records you have to this file. The script can contain the following commands.
echo "eno,ename,sal" > temp_file cat emp.txt >> temp_file mv temp_file emp.txt Regards, Rahul. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|