07-09-2011
sed -n '/\/$/!p' inputfile
This User Gave Thanks to ltomuno For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I could really use some help with this issue. I'm having a lot of trouble getting my sed command to delete only the lines from my file that end with _;
I'm also supposed to carry the leading 'c' down to the next line. The commands I've tried either delete everything or nothing at all. Any help... (12 Replies)
Discussion started by: turbulence
12 Replies
2. Solaris
I have a text file with rows of information (it is basically a ls command information(o/p from ls command))
I need to remove the lines ending with a .cnt extension and keep the lines ending with .zip extension, how to accomplish this.
I also only need the date,size and name of the file from every... (2 Replies)
Discussion started by: ramky79
2 Replies
3. Shell Programming and Scripting
I'm trying to search for lines ending with "}" with the following command but am not getting any output.
grep '\}$' myFile.txt
I actually want to negate this (i.e. lines not ending with "}"), but I guess that should be easier once I find the command that finds it? (11 Replies)
Discussion started by: BootComp
11 Replies
4. Shell Programming and Scripting
HI
I'm looking to delete lines ending with .tk from below data file
---------
abc.tk
mgm.tk
dtk
mgmstk
------
I have written below code
----
sed '/.tk *$/d' dat_file.txt > temp.txt
----
But its deleting all the lines ending with tk. I need to delete only the lines ending .tk
my... (5 Replies)
Discussion started by: shekhar_v4
5 Replies
5. Shell Programming and Scripting
Hi I have files that end with .txt.txt that i want to delete. But I also have files that end with .txt that I want to leave intact. How do I specifically delete files that end with .txt.txt in a folder.
thanks (5 Replies)
Discussion started by: kylle345
5 Replies
6. Shell Programming and Scripting
Hi,
I have an ASCII text file where some of the lines are ending with '+' character.
I have to concatenate the next successive line with those lines having the trailing '+' char by removing that char.
The below awk code has some problems to do this task:
awk '{while(sub(/\+$/,"")) {... (12 Replies)
Discussion started by: royalibrahim
12 Replies
7. Shell Programming and Scripting
How to delete ending/trailing spaces using awk,sed,perl?
Input:(each line has extra spaces at the end)
3456 565
3 7
35 878
Expected output:
3456 565
3 7
35 878 (5 Replies)
Discussion started by: cola
5 Replies
8. UNIX for Dummies Questions & Answers
I have a file where some lines end with '*'.
I would like to remove those lines ending with '*'.
inFile:
a
b*
c
d*outFile:
a
cThank you (7 Replies)
Discussion started by: jdhahbi
7 Replies
9. UNIX for Dummies Questions & Answers
I am trying to find files that have lines in them that end in an r. I have been able to locate files by using the following command:
find . -type f -name "*RECORDS"| xargs grep -l r$
However, I now want to find files that don't end in r anywhere. That means that no sentences or lines in... (9 Replies)
Discussion started by: newbie2010
9 Replies
10. UNIX for Beginners Questions & Answers
I have a file of a content like this:
abc_bla -def 800
abc_bla -def 802
abc_bla -def 804
abc_bla -def 806
abc_bla -def 808
abc_bla -def 810
abc_bla -def 812
abc_bla -def 814
...
abc_bla -def 898
abc_bla -def 900
abc_bla -def 902
abc_bla -def 904
...
abc_bla -def 990
abc_bla -def... (7 Replies)
Discussion started by: maya3
7 Replies
pstopdf(1) BSD General Commands Manual pstopdf(1)
NAME
pstopdf -- convert PostScript input into a PDF document.
SYNOPSIS
pstopdf [inputfile] [-o outname] [-l] [-p] [-i]
DESCRIPTION
pstopdf is a tool to convert PostScript input data into a PDF document. The input data may come from a file or may be read from stdin. The
PDF document is always written to a file. The name of the output PDF file is derived from the name of the input file or may be explicitly
named using the -o option.
Flags:
-o outname
The name of the output file to create. If an explicit file name is not supplied, the output file will be created in the current
directory and named foo.pdf for an input file named foo.ps
-i Reads from stdin rather than a named input file. If the output file is not explicitly named and the input data comes from stdin the
named output file will be stdin.pdf
-l Specifies that any messages generated during file conversion be written to a log file. For an output file named foo.pdf the generated
log file is foo.pdf.log rather than generated to stdout. If there are no messages, the log file is not generated.
-p Generates a simple progress message to stdout at the end of each page. Because conversion of complex or lengthy PostScript input can
take time, it is sometimes useful to see that progress is being made. Progress messages are always written to stdout even when the -l
(log file) option is specified.
EXAMPLES
pstopdf inputfile.ps Creates a PDF file named inputfile.pdf from the PostScript data in the input file inputfile.ps
pstopdf -i -o outputfilename Creates a PDF file named outputfilename from the PostScript data read from stdin.
Apple Computer, Inc. June 2, 2019 Apple Computer, Inc.