That's a good point, Jim. Thanks for pointing that out. More specifically, you could use tr to remove carriage returns only if they occur at the end of a line by doing:
Hi,
I'm not very familiar with unix shell. I want to replace the combination of two carriage returns and one newline with one carriage return and one newline. I think the best way to do this is to use sed. I tried something like this:
sed -e "s#\#\#g" file.txt
but it doesn't work.
Thanx... (2 Replies)
As the title suggests, i am having some trouble figuring out how to pass spaces and carriage returns to a 'here document' ie
#!/bin/bash
/usr/local/install_script.sh <<SCRIPT
yes
no
<pass carriage retun here>
yes
no
<pass a space and then a carriage return here>
exit
SCRIPT
any... (0 Replies)
Is there any way to remove carriage retuns between the records?
We have input records separated by TABS and have carriage returns as below:
123 456 789 ABC "1952.00" 678 "abcdef
ghik
lmno"
Above we... (10 Replies)
How do we delete all carriage returns after a particular string using sed inside a K Shell?
e.g. I have a text file named file1 below:
$ more file1
Group#=1 User=A
Role=a1
Group#=2 User=B
Role=a1
Role=b1
Group#=3 User=C
Role=b1
I want the carriage returns to be delete on the... (12 Replies)
Hello, I have read a few threads on this subject and tried a few things out, but still come up short.
There was one good example, then the last reply was something to the effect of 'Use Sed' & 'Read a book'...
Well I read a bunch of online tutorials on sed, awk, tr, but still can't get the... (2 Replies)
Hello,
I need help adding carriage returns at specific intervals (say 692 characters) to a text file that's one continous string. I'm working in AIX5.3. Any quick help is appreciated.
Thanks! (2 Replies)
I have a CSV with carriage returns in place of newlines. I am trying to use tr to remove them, but it isn't working.
Academic year,Term,Course name,Period,Last name,Nickname
2012-2013,First Semester,English 12,4th Period,Arnold,Adam
2012-2013,First Semester,English 12,4th Period,Adams,Jim... (1 Reply)
Hello Gurus,
I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file.
1|ABC DEF|100|10
2|PQ
RS
T|200|20
3| UVWXYZ|300|30
4| GHIJKL|400|40... (7 Replies)
I'm on Linux version 2.6.32-696.3.1.el6.x86_64, using the Ksh shell.
I'm working with the input file:
John Daggett, 341 King Road, Plymouth MA
Alice Ford, 22 East Broadway, Richmond VA
Orville Thomas, 11345 Oak Bridge Road, Tulsa OK
Terry Kalkas, 402 Lans Road, Beaver Falls PA
Eric Adams,... (2 Replies)
Discussion started by: prooney
2 Replies
LEARN ABOUT REDHAT
ps2epsi
PS2EPSI(1) Ghostscript Tools PS2EPSI(1)NAME
ps2epsi - generate conforming Encapsulated PostScript
SYNOPSIS
ps2epsi infile.ps [ outfile.epsi ] (Unix)
ps2epsi infile.ps [ outfile.epi ] (DOS)
DESCRIPTION
ps2epsi uses gs(1) to process a PostScript(tm) file and generate as output a new file which conforms to Adobe's Encapsulated PostScript
Interchange (EPSI) format. EPSI is a special form of encapsulated PostScript (EPS) which adds to the beginning of the file in the form of
PostScript comments a bitmapped version of the final displayed page. Programs which understand EPSI (usually word processors or DTP pro-
grams) can use this bitmap to give a preview version on screen of the PostScript. The displayed quality is often not very good (e.g., low
resolution, no colours), but the final printed version uses the real PostScript, and thus has the normal PostScript quality.
USAGE
On Unix systems invoke ps2epsi like this:
ps2epsi infile.ps [ outfile.epsi ]
where "infile.ps" is the input file and "outfile.epsi" is the resulting EPSI file. If the output filename is omitted, it is generated from
the input filename. When a standard extension (".ps", ".cps", ".eps" or ".epsf") is used, it is replaced with the output extension
".epsi". On DOS systems the command is:
ps2epsi infile.ps outfile.epi
where "infile.ps" is the original PostScript file, and "outfile.epi" is the name of the output file.
LIMITATIONS
Not every PostScript file can be encapsulated successfully, because there are restrictions on what PostScript constructs a correct encapsu-
lated file may contain. ps2epsi does a little extra work to try to help encapsulation, and it automatically calculates the bounding box
required for all encapsulated PostScript files, so most of the time it does a pretty good job. There are certain to be cases, however,
where the encapsulation does not work because of the content of the original PostScript file.
COMPATIBILITY
The Framemaker DTP system is one application which understands EPSI files, and ps2epsi has been tested on a number of PostScript diagrams
from a variety of sources, using Framemaker 3.0 on a Sun workstation. Framemaker on other platforms should be able to use these files,
although I have not been able to test this.
FILES
ps2epsi Unix shell script
ps2epsi.ps the Ghostscript program which does the work
SEE ALSO
gs (1)
VERSION
This document was last revised for Ghostscript version 7.05. However, the content may be obsolete, or inconsistent with ps2epsi.txt.
AUTHOR
George Cameron
7.05 22 April 2002 PS2EPSI(1)