Hi all,
I have a file with single white space delimited values, I want to convert them to a tab delimited file.
I tried sed, tr ... but nothing is working.
Thanks,
Rajeevan D (16 Replies)
i have a file whose data is like this::
osr_pe_assign|-120|wg000d@att.com|4|
osr_evt|-21|wg000d@att.com|4|
pe_avail|-21|wg000d@att.com|4|
osr_svt|-11|wg000d@att.com|4|
pe_mop|-13|wg000d@att.com|4|
instar_ready|-35|wg000d@att.com|4|
nsdnet_ready|-90|wg000d@att.com|4|... (6 Replies)
Hi, could some help me convert CSV file (with double quoted strings) to pipe delimited file:
here you go with the same data:
1,Friends,"$3.99 per 1,000 listings",8158here " 1,000 listings " should be a single field.
Thanks,
Ram (8 Replies)
I have a file which was pipe delimited, I need to make it tab delimited. I tried with sed but no use
cat file | sed 's/|//t/g'
The above command substituted "/t" not tab in the place of pipe.
Sample file:
abc|123|2012-01-30|2012-04-28|xyz
have to convert to:
abc 123... (6 Replies)
Hi How to make tab delimited file to space delimited?
in put file:
ABC kgy
jkh ghj
ash kjl
o/p file:
ABC kgy
jkh ghj
ash kjl
Use code tags, thanks. (1 Reply)
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)
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)
Hello, I need to get few values from a XML file and output needs to be written in another file with pipe delimited format. The Header & Footer of the Pipe Delimited file will be constant.
The below is my sample XML file. I need to pull the values in between the XML tags <Operator_info to... (15 Replies)
I have file in linux with comma delimited and string fields in double quotations ", I need to convert them to pipe delimiter please share your inputs.
Example:
Input:
"2017-09-30","ACBD,TVF","01234",NULL,18,NULL,"686091802","BANK OF ABCD, LIMITED, THE",790456
Output:
... (4 Replies)
Discussion started by: shieksir
4 Replies
LEARN ABOUT NETBSD
wc
WC(1) BSD General Commands Manual WC(1)NAME
wc -- word, line, and byte count
SYNOPSIS
wc [-c | -m] [-Llw] [file ...]
DESCRIPTION
The wc utility displays the number of lines, words, bytes and characters contained in each input file (or standard input, by default) to the
standard output. A line is defined as a string of characters delimited by a <newline> character, and a word is defined as a string of char-
acters delimited by white space characters. White space characters are the set of characters for which the iswspace(3) function returns
true. If more than one input file is specified, a line of cumulative counts for all the files is displayed on a separate line after the out-
put for the last file.
The following options are available:
-c The number of bytes in each input file is written to the standard output.
-L The number of characters in the longest line of each input file is written to the standard output.
-l The number of lines in each input file is written to the standard output.
-m The number of characters in each input file is written to the standard output.
-w The number of words in each input file is written to the standard output.
When an option is specified, wc only reports the information requested by that option. The default action is equivalent to all the flags
-clw having been specified.
The following operands are available:
file A pathname of an input file.
If no file names are specified, the standard input is used and no file name is displayed.
By default, the standard output contains a line for each input file of the form:
lines words bytes file_name
EXIT STATUS
The wc utility exits 0 on success, and >0 if an error occurs.
SEE ALSO iswspace(3)COMPATIBILITY
Historically, the wc utility was documented to define a word as a ``maximal string of characters delimited by <space>, <tab> or <newline>
characters''. The implementation, however, didn't handle non-printing characters correctly so that `` ^D^E '' counted as 6 spaces, while
``foo^D^Ebar'' counted as 8 characters. 4BSD systems after 4.3BSD modified the implementation to be consistent with the documentation. This
implementation defines a ``word'' in terms of the iswspace(3) function, as required by IEEE Std 1003.2 (``POSIX.2'').
The -L option is a non-standard extension, compatible with the -L option of the GNU and FreeBSD wc utilities.
STANDARDS
The wc utility conforms to IEEE Std 1003.2-1992 (``POSIX.2'').
BSD February 18, 2010 BSD