hey guys, how do i replace only a line within a file without messing up the rest of the contents of the file?
see, if possible can you guys give me a straight forward way to do this. i dont want a complex command. what i mean is i know i can accomplish this by using sed, well, i think i can,... (3 Replies)
Hi there
I have a file which has the lines
# Serial number for hostid
EXP_SERIAL_=""
These lines could be anywhere in the file as far as line numbers go, I would like replace these two lines with
# Serial number for hostid $var1
EXP_SERIAL_$var1="$var2"
Is there a quick and simple... (6 Replies)
Hi,
I have 2 sets of text files. I need to take a field from a certain line in set 1 and put it in the same place in set b. The line appears once per file, in different places but is a set format and has the unique word "ANTENNA" in it and is always 81 characters long. Example from set a:
... (7 Replies)
Hi Guys,
I am needing some help writing a shell script to replace the following in a text file
/opt/was/apps/was61
with some other path eg
/usr/blan/blah/blah.
I know that i can do it using sed or perl but just having difficulty writing the escape characters for it
All Help... (3 Replies)
Hi all,
Very first post on this forums, hope you can help me with this scripting task.
I have a big text file with over 3000 lines, some of those lines contain some text that I need to replace, lets say for simplicity the text to be replaced in those lines is "aaa" and I need it to replace it... (2 Replies)
I just created a file in vi, looks like this:
Hello nobody
nobody
What I need is to have sed change the file so it looks like this:
Hello everybody
In other words, the sed query needs to look for both instances of "nobody" before it puts the word "everybody" on the first line. ... (2 Replies)
I have a "main" file which has blocks of data for each user defined by tags BEGIN and END.
BEGIN
ID_NUM:24879
USER:abc123
HOW:47M
CMD1:xyz1
CMD2:arp2
STATE:active
PROCESS:id60
END
BEGIN
ID_NUM:24880
USER:def123
HOW:4M
CMD1:xyz1
CMD2:xyz2
STATE:running
PROCESS:id64
END (7 Replies)
I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed.
See below for the example data.
................................server 1...............................
running process 1
running... (8 Replies)
Here is the task that I was presented with:
I am dealing with about a 10,000 line input deck file for an analysis. About 10 separate blocks of around 25 lines of code each need to be updated in the input deck.
The input deck (deckToChange in the code below) comes with 2 separate files. File 1... (5 Replies)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT PHP
ps_show
PS_SHOW(3) 1 PS_SHOW(3)ps_show - Output textSYNOPSIS
bool ps_show (resource $psdoc, string $text)
DESCRIPTION
Output a text at the current text position. The text position can be set by storing the x and y coordinates into the values textx and
texty with the function ps_set_value(3). The function will issue an error if a font was not set before with ps_setfont(3).
ps_show(3) evaluates the following parameters and values as set by ps_set_parameter(3) and ps_set_value(3).
o charspacing (value)
- Distance between two consecutive glyphs. If this value is unequal to zero then all ligatures will be resolved. Values less than
zero are allowed.
o kerning (parameter)
- Setting this parameter to "false" will turn off kerning. Kerning is turned on by default.
o ligatures (parameter)
- Setting this parameter to "false" will turn off the use of ligatures. Ligatures are turned on by default.
o underline (parameter)
- Setting this parameter to "true" will turn on underlining. Underlining is turned off by default.
o overline (parameter)
- Setting this parameter to "true" will turn on overlining. Overlining is turned off by default.
o strikeout (parameter)
- Setting this parameter to "true" will turn on striking out. Striking out is turned off by default.
PARAMETERS
o $psdoc
- Resource identifier of the postscript file as returned by ps_new(3).
o $text
- The text to be output.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
SEE ALSO ps_continue_text(3), ps_show_xy(3), ps_setfont(3).
PHP Documentation Group PS_SHOW(3)