I have managed to remove the lines after pharse
thru below sed statement
.
Now I need to add a page break or add nubmer of lines that were deleted after this pharase.
Is there a way that I can make the following work with using variables?
perl -pi -e 's#blah#hrm#ig' replacetext
but like this
var=blah
perl -pi -e 's#$var#hrm#ig' replacetext (3 Replies)
Dear friends please help,
I have a large data file with few hundred lines. A small example is shown below:
datafile is a file with few hundred lines with the third column has many different character stings:
test 100 abc
test 134 bcd
test 356 cdf
test 831 dfg
test 720 fgh
I need to... (6 Replies)
I have an html file that looks like this (this is just a part of the html file):
<td colspan="3" rowspan="1" style="text-align: center; background-color: rgb(<!-- IDENTIFIER1 -->51, 255, 51);"><small><!-- IDENTIFIER2 -->UP</small></td>
This is to automatically update the status of the... (4 Replies)
I have 100+ python files in a single directory. I need to replace a specific path occurrence with a variable name.
Following are the find and the replace strings:
Findstring--"projects\\Debugger\\debugger_dp8051_01\\debugger_dp8051_01.cywrk"
Replacestring--self.projpath
I tried... (5 Replies)
i am editing a big log file with the following pattern:
Date: xxxx Updated: name
Some log file text here
Date: eee Updated: ny
Some log file text here
Basically i want to remove all the text in a line before the "Updated" pattern. I sill want to print the other... (4 Replies)
Here's the nonfunctional code I have so far
#!/bin/bash
searchFor=(`cat filea.txt` )
replaceWith=(`cat fileb.txt`)
myMax=${#searchFor}
myCounter=1
while ;
do sed -i 's/${$searchFor}/${$replaceWith}/g'
done
The goal is to use each line in filea.txt as a search term, and each line... (2 Replies)
how to add a text ( surya) at the beginning of a text files (so many) in folder
text file:
111111
555555
666666
result:
surya
111111
555555
666666 (3 Replies)
Have multiple files with the same format and certain text is the same. Have specific text to search for and then need to replace the next line. Can search on the text DEVICE and multiple lines will be found. The line after each DEVICE line has {. Want to replace the line { with {-someadditiontext.... (2 Replies)
I am trying to use awk skip each line with a ## or # and check each line after for STB= and if that value in greater than or = to 0.8, then at the end of line the text "STRAND BIAS" is written in else "GOOD".
So in the file of 4 entries attached.
awk tried:
awk NR > "##"' "#" -F"STB="... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT CENTOS
gslp
GSLP(1) Ghostscript GSLP(1)NAME
gslp - Format and print text using ghostscript
gsbj - Format and print text for BubbleJet printer using ghostscript
gsdj - Format and print text for DeskJet printer using ghostscript
gsdj500 - Format and print text for DeskJet 500 BubbleJet using ghostscript
gslj - Format and print text for LaserJet printer using ghostscript
SYNOPSIS
gslp -12BclqRr -b<header> -f<font> -F<hfont> -L<lines> -p<outfile> -T<n> --add-to-space <units> --add-to-width <units> --columns <n>
--detect --first-page <n> --kern <file.afm> --last-page <n> --(heading|footing)-(left|center|right) <string> --margin-(top|bot-
tom|left|right) <inches> --no-eject-(file|formfeed) --spacing <n> [gs options] [files]
gsbj [options] [files]
gsdj [options] [files]
gsdj500 [options] [files]
gslj [options] [files]
DESCRIPTION
This utility provides functionality approximately equivalent to the Unix enscript(1) program. It prints plain text files using a single
font. It currently handles tabs and formfeeds, but not backspaces. It will line-wrap when using fixed-pitch fonts. It will also do kern-
ing and width adjustment.
The default device (-sDEVICE=) and resolution (-r) are as follows:
gslp epson 180
gsbj bj10e 180
gsdj deskjet 300
gsdj500 djet500 300
gslj laserjet 300
By default the current date is formatted as the center header.
OPTIONS
Standard switches implemented:
-12BclqRr -b<header> -f<font> -F<hfont> -L<lines> -p<outfile>
Sun switches implemented:
-T<n> set tab width
Switches ignored:
-GghKkmow -# -C -d -J -n -P -S -s -t -v
Switches added:
--add-to-space <units>
add the given number of 1/72" units to the width of each space (may be negative)
--add-to-width <units>
add the given number of 1/72" units to the width of each character (may be negative)
--columns <n>
print in <n> columns
--detect
treat the file as PostScript if it starts with %!
--first-page <n>
start printing at page <n>
--kern <file.afm>
kern using information from the given .AFM file
--last-page <n>
stop printing after page <n>
--(heading|footing)-(left|center|right) <string>
set the heading/footing fields; use -B first to clear
--margin-(top|bottom|left|right) <inches>
set a margin
--no-eject-(file|formfeed)
end-of-file/FF only starts a new column, not a new sheet
--spacing <n>
use double (n=2), triple (n=3), etc. spacing
Also, the string %# in a heading or footing is replaced with the page #.
SEE ALSO gs(1)VERSION
This document was last revised for Ghostscript version 9.07.
AUTHOR
Artifex Software, Inc. are the primary maintainers of Ghostscript. This manpage by George Ferguson.
9.07 12 February 2013 GSLP(1)