Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Converting Space delimited file to Tab delimited file Post 302289763 by Ikon on Friday 20th of February 2009 11:26:07 AM
Old 02-20-2009
Try this:

Code:
 # cat test.log
1 2 3 4
a b c d
ased asd fff

# sed 's/ /\t/g' test.log
1       2       3       4
a       b       c       d
ased    asd     fff

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Tab delimited file to Comma delimited file in Unix

Hi, Can anyone let me know on how to convert a Tab delimited file to Comma delimited file in Unix Thanks!! (22 Replies)
Discussion started by: charan81
22 Replies

2. Shell Programming and Scripting

Help with converting Pipe delimited file to Tab Delimited

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)
Discussion started by: karumudi7
6 Replies

3. UNIX for Dummies Questions & Answers

Changing only the first space to a tab in a space delimited text file

Hi, I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies

4. Shell Programming and Scripting

How to make tab delimited file to space delimited?

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)
Discussion started by: jagdishrout
1 Replies

5. Shell Programming and Scripting

Converting varied space delimited file to Pipedemilited

Hi all, I have source file, data looks like 12345 abc def 01 / 001200 C 2000 12345 abc def 01 / 001200 C 2500 12345 abcd def 01 / 001200 C 3500 18945 xyz pqr 01 / 009900 D 4000 5000 2800 9900 Expected ouput... (3 Replies)
Discussion started by: srk409
3 Replies

6. Shell Programming and Scripting

How to convert space&tab delimited file to CSV?

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

7. UNIX for Dummies Questions & Answers

Need to convert a pipe delimited text file to tab delimited

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

8. Shell Programming and Scripting

Output file with <Tab> or <Space> Delimited

Input file: xyz,pqrs.lmno,NA,NA,NA,NA,NA,NA,NA abcd,pqrs.xyz,NA,NA,NA,NA,NA,NA,NA Expected Output: xyz pqrs.lmno NA NA NA NA NA NA NA abcd pqrs.xyz NA NA NA NA NA NA NA Command Tried so far: awk -F"," 'BEGIN{OFS=" ";} {print}' $File_Path/File_Name.csv Issue:... (5 Replies)
Discussion started by: TechGyaann
5 Replies

9. Shell Programming and Scripting

Help/Advise please for converting space delimited string variable to comma delimited with quote

Hi, I am wanting to create a script that will construct a SQL statement based on a a space delimited string that it read from a config file. Example of the SQL will be For example, it will read a string like "AAA BBB CCC" and assign to a variable named IN_STRING. I then concatenate... (2 Replies)
Discussion started by: newbie_01
2 Replies

10. UNIX for Beginners Questions & Answers

Replace a column in tab delimited file with column in other tab delimited file,based on match

Hello Everyone.. I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files FileP.txt ... (2 Replies)
Discussion started by: YogeshG
2 Replies
XFERFAXSTATS(8) 					      System Manager's Manual						   XFERFAXSTATS(8)

NAME
xferfaxstats - summarize HylaFAX transmission accounting SYNOPSIS
/usr/sbin/xferfaxstats [ options ] [ files ] DESCRIPTION
xferfaxstats is a command script that prints a summary of the HylaFAX accounting statistics for transmitted jobs. The statistics can be sorted using one of several keys: the sender's account name (default), the job tag (useful when used for accounting purposes), the remote party's CSI, the called phone number, the output device used for the call, the communication speed, and the communication data format. Statistics are read from the file /var/spool/hylafax/log/xferfaxlog in the spooling area, unless filenames are specified on the command line. The following table is an example of the output from xferfaxstats (using the default sort key): Destination Pages Time Pg/min Errs TypRate TypData cadsmith@esd.sgi.com 34 24:05 1.4 0 9600 1-D MH ctb@corp.sgi.com 32 20:43 1.5 2 9600 2-D MR edmark@esd.sgi.com 42 29:30 1.4 3 9600 1-D MH fredc@mfg.sgi.com 157 1:37:52 1.6 0 9600 2-D MR jlw@engr.sgi.com 81 57:29 1.4 1 9600 1-D MH jlw@wpd.sgi.com 346 3:57:57 1.5 100 9600 1-D MH karlton@asd.sgi.com 68 36:57 1.8 0 9600 1-D MH kerrie@mfg.sgi.com 48 32:29 1.5 1 9600 2-D MR kgraf@mfg.sgi.com 128 1:48:21 1.2 2 9600 1-D MH kubey@wpd.sgi.com 264 3:22:13 1.3 6 9600 1-D MH loki@wpd.sgi.com 205 2:56:45 1.2 5 9600 2-D MR moondog@esd.sgi.com 112 1:23:01 1.3 4 9600 2-D MR mpolen@mti.sgi.com 122 1:39:32 1.2 1 9600 1-D MH nancyf@mfg.sgi.com 174 2:08:44 1.4 2 9600 2-D MR paulh@mfg.sgi.com 56 1:29:24 0.6 0 9600 2-D MR richardn@mfg.sgi.com 34 24:42 1.4 1 9600 1-D MH rosa@corp.sgi.com 32 28:00 1.1 2 9600 1-D MH sam@asd.sgi.com 65 46:25 1.4 5 9600 1-D MH seth@asd.sgi.com 34 25:04 1.4 0 9600 1-D MH -------------------------------------------------------------------------- Total 2034 25:49:13 1.3 135 The first column column shows the sort key value used (the sender's identity here, but otherwise the destination phone number, remote CSI, etc.). The Pages column is the total number of good pages transmitted. The time column shows the total amount of time spent transmitting. The Pg/min column displays the average transfer rate. The Errs column indicates how many errors were encountered while transmitting fac- simile. (Note that this statistic does not include problems encountered while placing a call; e.g. busy signals.) The TypRate column displays the most common communication speed with which facsimile were transmitted. The TypData column shows the most common data format in which facsimile data were transmitted. Account names other than ``root'' and ``guest'' can be automatically mapped to a canonical format in which the host name is removed and identical addresses in the same domain are merged together (i.e. for NIS environments). For example, ``sam@flake.asd.sgi.com'' and ``sam@foobar.asd.sgi.com'' are both mapped to ``sam@asd.sgi.com'' with the associated statistics accumulated. Identical account names in different domains generate a warning; e.g. ``loki@wpd.sgi.com'' and ``loki@corp.sgi.com''. The above mapping is done only if the -map option is specified, by default account names are not altered. OPTIONS
-age days Show information only for the facsimile transmitted in the last specified number of days. -csi* Sort output by the remote party's CSI. -dest* Sort output by the phone number called. -dev* Sort output by the output device (i.e. modem) used. -format Sort output by the negotiated data format. -job* Sort output by client-specified job tag identifiers. -nomap Do not perform the account name mapping by which statistics for the ``root'' and ``guest'' accounts are merged and leading hostname part of domain names are stripped. This is the default behavior. -map Perform the account name mapping by which statistics for the ``root'' and ``guest'' accounts are merged and leading hostname part of domain names are stripped. -send* Sort output by sender's account name (default). -since time Show information only for the facsimile transmitted since the specified time; where time is of the form ``MM/DD/YY HH:MM'' (the date(1) format string %D %H:%M). -end time Show information only for the facsimile transmitted before the specified time; where time is of the same form as since. -speed Sort output by the signalling rate. DIAGNOSTICS
``Warning, address clash, "%s" and "%s".'' During address mapping two mapped addresses were found for the same account name. ``Warning, weird user address/name "%s".'' During address mapping an address was encountered that multiple ``@'' symbols in it. NOTES
The sender field does not necessarily represent the submitter's actual identity. For example, it reflects the value given by the send- fax(8) ``-f'' option. Be cautious that this field is not utilized for auditing if the fax user base is not trusted. FILES
/var/spool/hylafax spooling area log/xferfaxlog default file from which to read statistics SEE ALSO
faxq(8), faxsend(8), recvstats(8), hylafax-log(5) May 12, 1996 XFERFAXSTATS(8)
All times are GMT -4. The time now is 06:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy