Sponsored Content
Top Forums Shell Programming and Scripting append data in a file by using tab delimiter Post 302220110 by era on Thursday 31st of July 2008 01:07:20 AM
Old 07-31-2008
But as noted earlier, there are dialects of echo and not all of them work like that. printf is at least somewhat more portable. Or to paraphrase the immortal words of the creator of Perl (Larry Wall: "It is easier to write a portable shell than to write a portable shell script"), use a portable language instead. (Hint: Perl.)

Code:
perl -le 'print "Data1", "\t", "Data2"' >>filename.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace delimiter : with '\001' in unix data file

HI can any one tell me how to replace a delimiter : with another delimiter '\001' it is a non printable octal character. thanks in adv spandu (4 Replies)
Discussion started by: spandu
4 Replies

2. Shell Programming and Scripting

Cutting a tab delimiter file

I have a 30 column tab delimited record file. I need to extract the first 10column. The following command to cut was not working cut -f 1-10 -d "\t" filename. Could any one keep on this . Thanks in Advance (4 Replies)
Discussion started by: vinod.thayil
4 Replies

3. UNIX for Advanced & Expert Users

how to search delimiter tab in a line and replace it

hi every one plz help me i want to search for a line contains tabspace This is a line The should be changed see the above line is seperated with tab space i want to replace that tab space in to # as This is a line#The should be changed i have tried with... (4 Replies)
Discussion started by: kkraja
4 Replies

4. UNIX for Dummies Questions & Answers

Delimiter: Tab or Space?

Hello, Is there a direct command to check if the delimiter in your file is a tab or a space? And how can they be converted from one to another. Thanks, G (4 Replies)
Discussion started by: Gussifinknottle
4 Replies

5. Shell Programming and Scripting

creating delimiter file & append with cron

I have the following script working fine, and need to generate a file delimiter (with tab or special character) for Excel data import. The script will run every hour in crontab to append the new rows to the delimiter, so that I can collect the data for i.e. a week, which will give me a lot of... (0 Replies)
Discussion started by: Daniel Gate
0 Replies

6. UNIX for Dummies Questions & Answers

add (append) a column in a tab delimited file

I have a file having the following entries: test1 test2 test3 11 22 33 22 44 66 99 99 44 --- I want to add a column so that the above file becomes: test1 test2 test3 notest 11 22 33 * 22 44 66 * 99 99 44 * --- Thanks (6 Replies)
Discussion started by: mary271
6 Replies

7. UNIX for Dummies Questions & Answers

Making a Tab delimiter file to Comma

How can i make a tab delimiter file to a comma delimiter??? (13 Replies)
Discussion started by: saggiboy10
13 Replies

8. Shell Programming and Scripting

Compare two tab-delimiter files

Hi, I have two files like: file1 chr1 40 chr1 50 chr2 10 chr2 60 file2 chr1 30 chr1 50 chr2 15 chr2 20 and want to get the difference of column 2 when column 1 is the same in both files. (4 Replies)
Discussion started by: linseyr
4 Replies

9. Shell Programming and Scripting

[Solved] Append an header to a tab delimited file

Dear All, I would like to find an automatic way to add a given code which belong to a class at the end of the column , for example this is my input file: 0610009O20Rik V$VMYB_01 310 (+) 1 0.971 v-Myb V$EVI1_04 782 (-) 0.763 0.834 Evi-1 V$ELK1_02 1966 (-) 1 0.984 Elk-1... (4 Replies)
Discussion started by: paolo.kunder
4 Replies

10. Shell Programming and Scripting

Need to loop file data based on delimiter

My file has data that looks like below: more data.txt I wish to display each string seperated by a delimiter : Expected output: I tried the below but I m not getting every split string on a new line. #!/bin/bash for i in `sed 's/:/\\n/g' data.txt`; do echo -n... (2 Replies)
Discussion started by: mohtashims
2 Replies
ppmtotga(1)                                                   General Commands Manual                                                  ppmtotga(1)

NAME
ppmtotga - convert portable pixmap into a TrueVision Targa file SYNOPSIS
ppmtotga [-mono|-cmap|-rgb] [-norle] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces a TrueVision Targa file as output. OPTIONS
-mono Forces Targa file to be of type 8 bit monochrome. Input must be a portable bitmap or a portable graymap. -cmap Forces Targa file to be of type 24 bit colormapped. Input must be a portable bitmap, a portable graymap or a portable pixmap con- taining no more than 256 distinct colors. -rgb Forces Targa file to be of type 24 bit unmapped color. -norle Disables run-length encoding, in case you have a Targa reader which can't read run-length encoded files. All flags can be abbreviated to their shortest unique prefix. If no file type is specified the most highly constained compatible type is used, where monochrome is more constained than colormapped which is in turn more constained than unmapped. BUGS
Does not support all possible Targa file types. Should really be in PNM, not PPM. SEE ALSO
tgatoppm(1), ppm(5) AUTHOR
Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer. 28 October 1991 ppmtotga(1)
All times are GMT -4. The time now is 03:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy