05-08-2012
Yes... But what would the file look like, before, and then what would it look like, after. All together -- not in pieces.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello i need some help with the usage of sed.
Situation : 2 textfiles, file.in , file.out
In the first textfile which is called file.in are the words for the substitution.
Every word is in a new-line like :
Firstsub
Secondsub
Thridsub
...
In the second textflie wich is called file.out is... (5 Replies)
Discussion started by: Kingbruce
5 Replies
2. Shell Programming and Scripting
Hello,
I want to writte a script that replace two character strings by two variables with the command sed butmy solution doesn't work. I'm written this: sed "s/TTFactivevent/$TTFav/g && s/switchSLL/$SLL/g" templatefile.
I want to replace TTFactivevent by the variable $TTFav, that is a... (4 Replies)
Discussion started by: POPO10
4 Replies
3. Shell Programming and Scripting
Hi, i read couple of threads here on forum, and googled about what bugs me, yet i still can't find solution.
Problem is below.
I need to change this string (with sed if it is possible):
This is message text that is being quoted
to look like this:
This is message text that is being quotedI... (2 Replies)
Discussion started by: angrybb
2 Replies
4. Shell Programming and Scripting
Hey everyone!
Simple question - I am trying to use sed to replace two different strings. As it stands I can implement this as:
sed -i 's/TIMEOUT//g'
sed -i 's/null//g'
And it works. However, is it possible to shrink that down into a single command? Will there be any performance benefits? (3 Replies)
Discussion started by: msarro
3 Replies
5. Shell Programming and Scripting
Hi guys,
Hi have this input (Menu.xml)<?xml version="1.0" encoding="ISO-8859-1"?>
<breakfast_menu>
<food>
<name>Berry-Berry Belgian Waffles</name>
<price>$8.95</price>
<calories>900</calories>
</food>
<food>
<name>French Toast</name>
... (6 Replies)
Discussion started by: cgkmal
6 Replies
6. Shell Programming and Scripting
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
7. Programming
Dear All,
I am having a requirement to find the difference between 2 files and generate a discrepancy report out of it as an html page. I prefer using diff -y file1 file2 since it gives user friendly layout to know any discrepancy in the record and unique records among the 2 file. Here's how it... (12 Replies)
Discussion started by: Badhrish
12 Replies
8. Shell Programming and Scripting
I am looking for a sed in which I can recognize all of the text in between two indicators and then replace it with a place holder.
For instance, the 1st indicator is a list of words "no|noone|havent" and the 2nd indicator is a list of punctuation ".|,|!".From a sentence such as
"noone... (3 Replies)
Discussion started by: owwow14
3 Replies
9. UNIX for Beginners Questions & Answers
Hi Everyone,
I want to find this 2 strings in a single line a file and replace the second string.
this is the line i need to find
<param name="user" value="CORE_BI"/>
find user and CORE_BI and replace only CORE_BI with admin
so finally the line should look like this.
<param... (5 Replies)
Discussion started by: shajay12
5 Replies
10. Shell Programming and Scripting
Hello,
I would like to replace all occurencies of long data types by others (coresponding int) using 'sed' in the extensive source code of a software package written for 32 bit CPUs.
I must use regular expressions to avoid wrong replacements like
s/unsigned]+long/ulong/gLeaving out... (2 Replies)
Discussion started by: Mick P. F.
2 Replies
LEARN ABOUT REDHAT
pamdice
pamdice(1) General Commands Manual pamdice(1)
NAME
pamdice - slice a Netpbm image into many horizontally and/or vertically
SYNOPSIS
pamslice -outstem=filenamestem [-width=width] [-height=height] [-verbose] [filename]
You can use the minimum unique abbreviation of the options. You can use two hyphens instead of one. You can separate an option name from
its value with white space instead of an equals sign.
DESCRIPTION
Reads a PAM, PBM, PGM, or PPM image as input. Splits it horizontally and/or vertically into equal size pieces and writes them into sepa-
rate files as the same kind of image.
See the -outstem option for information on naming of the output files.
The -width and -height options determine the size of the output pieces.
pnmcat can rejoin the images.
OPTIONS
-outstem=filenamestem
This option determines the names of the output files. Each output file is named filenamestem_y_x.type where filenamestem is the
value of the -outstem option, x and y are the horizontal and vertical locations, respectively, in the input image of the output
image, zero being the leftmost and top, and type is .pbm, .pgm, .ppm, or .pam, depending on the type of image.
-width=width
gives the width in pixels of the output images. The rightmost pieces are smaller than this if the input image is not a multiple of
width pixels wide.
-height=height
gives the height in pixels of the output images. The bottom pieces are smaller than this if the input image is not a multiple of
height pixels high.
-verbose
Print information about the processing to Standard Error.
SEE ALSO
pamcut(1), pnmcat(1), pgmslice(1), pnm(5)
AUTHOR
put by Bryan Henderson in the public domain in 2001
31 January 2001 pamdice(1)