Sponsored Content
Top Forums Shell Programming and Scripting Separate lines in a single '|' separated line Post 302176022 by jim mcnamara on Monday 17th of March 2008 07:13:11 AM
Old 03-17-2008
one way
Code:
tr -s '\n' '|' < inputfile | sed 's/|$//' > newfile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

two lines into one colon separated line...

Does anyone know how to get these two output lines into one colon ':' separated line with some unix command? Maybe nawk. I've tried to read the nawk and awk man pages but I don't get it right. Are these commands the one to use? Output from find command: # /sw/tools/matlab/7.0.1/man... (2 Replies)
Discussion started by: tonlu
2 Replies

2. Shell Programming and Scripting

separate two numbers separated by :

Hi all i have a data of this form 10.12.4.22:138 10.12.2.50:137 10.20.2.24:1027 10.12.2.44:138 10.12.2.44:137 10.0.4.38:58871 10.13.3.19:138 i need to separate the number out which is at the last and after ':' Please help me out Thanx in advance (5 Replies)
Discussion started by: vaibhavkorde
5 Replies

3. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

4. Shell Programming and Scripting

read one line file and separate into multiple lines

I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field. example input line: ... (2 Replies)
Discussion started by: erlanq
2 Replies

5. Shell Programming and Scripting

read one line file and separate into multiple lines

I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field. example input line: ... (1 Reply)
Discussion started by: erlanq
1 Replies

6. Shell Programming and Scripting

Count lines separated by new line

Hi guys, I have a file which has random records like mentioned below emcpower28a pci@3,03 (disk physical name) pci@3,04 emcpower9a pci@1,03 pci@2,03 pci@3,01 pci@4,03 there could be any number of disk names for any LUN (emc...) So, I want a solution to count disk names for its... (12 Replies)
Discussion started by: prashant2507198
12 Replies

7. Shell Programming and Scripting

Make multiple lines into single quoted comma separated Linux

Hi, I want to change a file file1.txt: 1234 3456 2345 6789 3456 2333 4444 As, file2.txt in Linux: '1234','3456','2345','6789','3456','2333','4444' Could someone please help me. (Single liner sed, awk will be welcome!) (7 Replies)
Discussion started by: wiweq05
7 Replies

8. Shell Programming and Scripting

Combining multiple block of lines in one comma separated line

Hi Everyone, On my Linux box I have a text file having block of few lines and this block lines separated by one blank line. I would like to format and print these lines in such a way that this entire block of lines will come as single comma separated line & again next block of lines in next... (7 Replies)
Discussion started by: gr8_usk
7 Replies

9. UNIX for Beginners Questions & Answers

Output to file print as single line, not separate line

example of problem: when I echo "$e" >> /home/cogiz/file.txt result prints to file as:AA BB CC I need it to save to file as this:AA BB CC I know it's probably something really simple but any help would be greatly appreciated. Thank You. Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies

10. Shell Programming and Scripting

Help to join separate lines in a single one from xml file

Hi all, I need help to parse this xml file that has paragraphs broken in different lines and I would like to join in a single line. I hope you can understand my explanation. Thanks for any help/direction. The script could be in bash, awk, ruby, perl whatever please In the output I want:... (8 Replies)
Discussion started by: Ophiuchus
8 Replies
PSWRAP(1)						      General Commands Manual							 PSWRAP(1)

NAME
pswrap - creates C procedures from segments of PostScript language code SYNOPSIS
pswrap [ -apr ] [ -o outputCfile ] [ -h outputHfile ] [ -s maxstring ] inputfile DESCRIPTION
pswrap reads input from inputfile and creates C-callable procedures, known as wraps, that send PostScript language code to the PostScript interpreter. inputfile contains segments of PostScript language code wrapped with a C-like procedure syntax. Wraps are the most efficient way for an application to communicate with the PostScript interpreter. For complete documentation of pswrap and the language it accepts, see "pswrap Reference Manual" in Programming the Display PostScript System with X. OPTIONS
inputfile A file that contains one or more wrap definitions. pswrap transforms the definitions in inputfile into C procedures. If no input file is specified, the standard input (which can be redirected from a file or pipe) is used. The input file can include text other than wrap definitions. pswrap converts wrap definitions to C procedures and passes the other text through unchanged. Therefore, it is possible to intersperse C-language source code with wrap definitions in the input file. Note: Although C code is allowed in a pswrap input file, it is not allowed within a wrap body. In particular, no CPP macros (for example, #define) are allowed inside a wrap. -a Generates ANSI C procedure prototypes for procedure definitions in outputCfile and, optionally, outputHfile. The -a option allows compilers that recognize the ANSI C standard to do more complete type checking of parameters. The -a option also causes pswrap to generate const declarations. Note: ANSI C procedure prototype syntax is not recognized by most non-ANSI C compilers, including many compilers based on the Porta- ble C Compiler. Use the -a option only in conjunction with a compiler that conforms to the ANSI C Standard. -h outputHFile Generates a header file that contains extern declarations for non-static wraps. This file can be used in #include statements in mod- ules that use wraps. If the -a option is specified, the declarations in the header file are ANSI C procedure prototypes. If the -h option is omitted, a header file is not produced. -o outputCFile Specifies the file to which the generated wraps and passed-through text are written. If omitted, the standard output is used. If the -a option is also specified, the procedure definitions generated by pswrap are in ANSI C procedure prototype syntax. -p Specifies that strings passed by wraps are padded so that each data object begins on a long-word (4-byte) boundary. This option allows wraps to run on architectures that restrict data alignment to 4-byte boundaries and improves performance on some other archi- tectures. -r Generates reentrant code for wraps shared by more than one process (as in shared libraries). Reentrant code can be called recur- sively or by more than one thread. The -r option causes pswrap to generate extra code, so use it only when necessary. -s maxstring Sets the maximum allowable length of a PostScript string object or hexadecimal string object in the wrap body input. A syntax error is reported if a string is not terminated with ) or > within maxstring characters. maxstring cannot be set lower than 80; the default is 200. SEE ALSO
Programming the Display PostScript System with X (Addison-Wesley Publishing Company, Inc., 1993). AUTHOR
Adobe Systems Incorporated NOTES
PostScript and Display PostScript are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions. Copyright (c) 1988-1994 Adobe Systems Incorporated. All rights reserved. Adobe Systems 4 Apr 1994 PSWRAP(1)
All times are GMT -4. The time now is 10:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy