07-06-2011
How to convert a text file into tab delimited format?
I have a text file that made using text editor in Ubuntu. However the text file is not being recognized as space or tab delimited, the formatting seems to be messed up. How can I convert the text file into tab delimited format?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Please help me out with a script which checks whether a given file say abc.txt is in ASCII format and data is tab-delimited. If the condition doesn't satisfy then it should generate error code "100" for file not in ASCII format and "105" if it is not in tab-delimited format.
If the... (9 Replies)
Discussion started by: Mandab
9 Replies
2. Shell Programming and Scripting
Hi,
Can any one please help me in converting a tab delimited file in .csv file.
Records in my file are similar to mentioned below:
DET 001 0201 AC032508970 01478E1X8
DET 002 0202 AC032508971 01478E1X8
Could any one please suggest me what approach would be more suitable for this or if... (5 Replies)
Discussion started by: dtidke
5 Replies
3. Shell Programming and Scripting
Hi experts,
I need urget help! I have the a text file with this format:
Types of fruits
Name of fruits
1,1
Farm_no,1
apple,1
pineapple,1
grapes,1
orange,1
banana,1
2,2--->this is the record seperator
Farm_no,2
apple,1
pineapple,1
grapes,3
orange,2
banana,1
3,3--->this is the... (1 Reply)
Discussion started by: natalie23
1 Replies
4. UNIX for Dummies Questions & Answers
Hello Gurus,
I have a text file containing nearly 12,000 tab delimited characters with 4000 rows. If the file size is small, excel can convert the text into coloumns. However, the file that I have is very big. Can some body help me in solving this problem?
The input file example,
... (6 Replies)
Discussion started by: Unilearn
6 Replies
5. Shell Programming and Scripting
Hi all,
How can i convert comma delimited .csv file to tab separate using sed command or script.
Thanks,
Krupa (4 Replies)
Discussion started by: krupasindhu18
4 Replies
6. Shell Programming and Scripting
Hi all,
I have a 3 columns input file like this:
CPLX9PC-4943 CPLX9PC-4943 1
CPLX9PC-4943 CpxID123 0
CPLX9PC-4943 CpxID126 0
CPLX9PC-4943 CPLX9PC-5763 0.5
CPLX9PC-4943 CpxID13 0
CPLX9PC-4943 CPLX9PC-6163 0
CPLX9PC-4943 CPLX9PC-6164 0.04... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies
7. Shell Programming and Scripting
Hello,
I have a text file with space and tab (mixed) delimited file and need to convert into CSV.
# cat test.txt
/dev/rmt/tsmmt32 HP Ultrium 6-SCSI J3LZ 50:03:08:c0:02:72:c0:b5 F00272C0B5 0/0/6/1/1.145.17.255.0.0.0 /dev/rmt/c102t0d0BEST
/dev/rmt/tsmmt37 ... (6 Replies)
Discussion started by: prvnrk
6 Replies
8. UNIX for Dummies Questions & Answers
Hi, I have a rquirement in unix as below .
I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column.
ex:
Input Text file:
1|A|apple
2|B|bottle
excel file to be generated as output as... (9 Replies)
Discussion started by: raja kakitapall
9 Replies
9. UNIX for Beginners Questions & Answers
Hi
i have a problem in my job
i try to convert an excel file (xls extention) to text file (tab delimited), but no result with this comand
cat xxx.xls > xxx.txt
Do you have eny idea?
PS: sorry for my english
Thanks!! (4 Replies)
Discussion started by: frisso
4 Replies
10. Shell Programming and Scripting
Hi All,
How can we convert pipe delimited ( or comma ) file to vertical tab (VT) delimited.
Regards
PK (4 Replies)
Discussion started by: prasson_ibm
4 Replies
unifdef(1) General Commands Manual unifdef(1)
NAME
unifdef - remove preprocessor lines
SYNOPSIS
sym] sym] sym] sym]] ... [file]
DESCRIPTION
simulates some of the actions of in interpreting C language preprocessor command lines (see cpp(1)). For a valid preprocessor command line
contains as its first character a and one of the following keywords: or The character and its associated keyword must appear on the same
line, but they can be separated by spaces, tabs, and commented text. When appropriate, the portions of code surrounded by and including
the targeted preprocessor directives are removed, and the resultant text is written to the standard output.
Unlike does not insert included files, interpret macros, or strip comment lines. This means, among other things, that and macros occurring
within the input text are not interpreted.
Since is language-independent, it can be used for processing source files for languages other than the C language. For example, can be
used on FORTRAN language source files, provided the C language preprocessor commands are used.
Options
recognizes the following command-line options:
Complement the normal behavior by printing only the rejected lines.
Ignore text delimited by
sym. In other words, text that would otherwise be affected by some action is not touched when found within the context
of a preprocessor command using sym.
Ignore text delimited by
sym.
Replace rejected lines with blank lines
in the text written to the standard output.
Treat the input source as plain text.
C-language comment and quoting constructs are not recognized.
Define symbol
sym.
Cause symbol
sym to be undefined.
RETURN VALUE
The command returns the following exit values:
0 Output is an exact copy of the input.
1 Output is not an exact copy of the input.
2 The command fails. The failure might be due to a premature EOF or to an inappropriate or
EXAMPLES
Assume file contains the following:
The command sequence:
produces the following result in file
WARNINGS
Any symbol name defined in the file must be specified in the command line; otherwise, will ignore the line.
AUTHOR
was developed in the public domain.
SEE ALSO
cpp(1).
unifdef(1)