Sponsored Content
Full Discussion: Pipe delimited output
Top Forums Shell Programming and Scripting Pipe delimited output Post 302756603 by Tommyk on Wednesday 16th of January 2013 06:42:40 AM
Old 01-16-2013
Pipe delimited output

Hi All,

i have the following command

Code:
df|awk '{print $5}'|grep /| egrep -v '^/$|/usr|/opt|/var/log|/home|/tmp'

output looks like:

Code:
/filesystem/number1
/filesystem/number2
/filesystem3
/possiblymoreoutput

i want the output to look like the below (either in a file or to output to screen i dont mind):
Code:
/filesystem/number1|/filesystem/number2|/filesystem3|/possiblymoreoutput

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

convert a pipe delimited file to a':" delimited file

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

2. UNIX for Dummies Questions & Answers

Delete last value from pipe delimited file

I have a large(ish) pipe delimited file. The last line of the file contains a total row count and a checksum: END|1537451|1328569446 After making other adjustments to the file, I need to strip out the checksum and apply a new value - I have a script to generate the checksum and 'cat' it... (3 Replies)
Discussion started by: relentl3ss
3 Replies

3. Shell Programming and Scripting

How to convert a space delimited file into a pipe delimited file using shellscript?

Hi All, I have space delimited file similar to the one as shown below.. I need to convert it as a pipe delimited, the values inside the pipe delimited file should be as highlighted... AA ATIU2345098809 009697 005374 BB ATIU2345097809 005445 006518 CC ATIU9685098809 003215 003571 DD... (7 Replies)
Discussion started by: nithins007
7 Replies

4. Shell Programming and Scripting

Linux - Script to generate the output delimited by Comma/Pipe

Hi All, I have a requirement where I need to go to a directory, list all the files that start with person* (for eg) & read the most recent file from the list of files. While browsing through the forum, i found that the command ls -t will list the files. I am trying to generate the output... (1 Reply)
Discussion started by: dsfreddie
1 Replies

5. 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

6. Shell Programming and Scripting

Grep:pipe delimited output

Hi, I am trying to search for a string in a file and print all the matched lines as pipe delimited format. My command is cat m_gid_trans.XML|grep -i '<TABLEATTRIBUTE NAME ="Lookup cache directory name"' The output I am getting is <TABLEATTRIBUTE NAME ="Lookup cache directory name"... (4 Replies)
Discussion started by: sampoorna
4 Replies

7. Shell Programming and Scripting

How to ignore Pipe in Pipe delimited file?

Hi guys, I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file for eg: file 1: xx|yy|"xyz|zzz"|zzz|12... using below awk command awk 'BEGIN {FS=OFS="|" } print $3 i would get xyz But i want as : xyz|zzz to consider as whole column... (13 Replies)
Discussion started by: rohit_shinez
13 Replies

8. Shell Programming and Scripting

Pipe delimited to csv

I have a small quandry. I had server reports that I pulled from a database that came out pipe "|" delimited. The developers have now changed the format to CSV. The issue is that some fields have quotes around the text and other fields are blank with strings of commas denoting each field. To further... (2 Replies)
Discussion started by: dagamier
2 Replies

9. 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

10. Shell Programming and Scripting

Get the output of w command in pipe delimited format

Since output of w command have variable number of columns I want to get the output in pipe delimited format. I tried export OFS="|"; w but that does not work. Any ideas? (4 Replies)
Discussion started by: Soham
4 Replies
ppdof(8)						      System Manager's Manual							  ppdof(8)

NAME
ppdof - Text to PostScript translation filter SYNOPSIS
/usr/lbin/ppdof +Cfilename [-n login] [-h host] [...] OPTIONS
Use of the print flags is dependent on the features available on the print device, and on the current status of those features. For exam- ple, when you select a particular paper size, the appropriate paper must be correctly loaded in the paper trays. Options in /etc/printcap The following options are set in the /etc/printcap file and can be specified using the + switch. For example: :if=/usr/lbin/ppdof +Bupper +Cln32.rpd: You can also specify command line options in the /etc/printcap file using the + switch. For example: :if=/usr/lbin/ppdof +Olandscape +Cln32.rpd: Here, the -Olandscape option is specified. Specifies the default tray name to select for printing the banner page. For example: :of=/usr/lbin/ppdof +Bupper +Cln32.rpd: In this example, the banner page will be printed on whatever stock is currently loaded into the upper tray on the selected print device. Specifies the printer configuration file to use for the print job. Specifies the unit of measurement to be inches or cen- timeters for lines per inch (lpi), characters per inch (cpi), and page margin options. The default value is inches. Specifies the default tray name to select for printing the trailer page. For example: :if=/usr/lbin/ppdof +olower +Cln32.rpd: Command Line Options Specify print filter options at the command line using the lpr command as follows. Multiple -O options are supported. Specifies the host name from which the job owner is submitting the print command. Specifies the login (account) name of the job owner. Specifies the name of the output tray where the printed pages are placed. Specifies the page width in columns for portrait and landscape printing. A page width of 0 instructs the filter to use 80 columns in portrait orientation and 132 columns in landscape orientation. Specifies the tray name from which print paper is selected. The printer may select an alternate tray when the paper size provided in the tray does not match the docu- ment requirements. Specifies the number of sides to print on each sheet. You can specify sides as follows: 1 or one - Print on one side of the sheet. 2 or two - Print on both sides of the sheet (duplex printing). Specifies options related to page orientation, formatting, and features as follows: Specifies the number of characters to print per inch. Specifies only even numbered sheets are to be printed. Speci- fies the printed output is parallel to the long side of the page. Specifies the number of lines to print per page. Specifies the number of lines to print per inch. Specifies only odd numbered sheets are to be printed. Specifies the range of pages to be printed, starting with page number m and ending with page number n. Specifies to print the list of options provided by the printer configuration file which includes paper sizes, input and output paper tray names. For example: # lpr -Oprint /etc/motd (Note that the file /etc/motd is specified to satisfy lpr command line requirements, the file itself is not printed.) Specifies the printed output is parallel to the short side of the page. These options specify the various page margins in inches. The page mar- gin sizes in inches as follows: tm= - Top margin in inches. For example -Otm=2 bm= - Bottom margin in inches. For example -Obm=1.5 lm= - Left margin in inches. For example -Olm=1 rm= - Right margin in inches. For example -Orm=3 pm= - Page margin. Using this option sets tm, bm, lm and rm to the same value. For example -Opm=1.25 When configuring the /etc/printcap entry, different margins for landscape and portrait orientation can be specified by adding the suffixes _l and _p respectively. For example: :if=/usr/lbin/ppdof +Olm_p=0.5 +Olm_l=0.25 +Cln32.rpd: DESCRIPTION
The ppdof filter translates ASCII to PostScript and handles the device dependencies of a PostScript printer. It is recommended that the ppdof filter be specified for both the :of and the :if fields in the /etc/printcap file. For a description of these fields, see the printcap(4) reference page. RESTRICTIONS
The commands generated by the ppdof filter to handle device dependencies might be incompatible with some PostScript documents. When a PostScript file does not print correctly use the following command to prevent file preprocessing. # lpr -x file.ps The filter will not setup device dependencies or provide ASCII to PostScript translation for documents containing printer control charac- ters. EXIT STATUS
Any value other than zero (0) indicates that an error has occurred. ERRORS
Use the lf error log field in the /etc/printcap to specify the name of the error log file. SEE ALSO
Commands: cancel(1), lpr(1), pr(1) Files: printcap(4). System Administration ppdof(8)
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy