Sponsored Content
Full Discussion: sed s/// syntax help
Top Forums Shell Programming and Scripting sed s/// syntax help Post 302494497 by Perderabo on Monday 7th of February 2011 12:31:55 PM
Old 02-07-2011
I tried both the way I told you and with your superfluous blackslash in front of a colon. Both work for me.

Code:
$ cat f
<tr><td width=10%  style='width:5%;background:#F7F0D9;padding:0in 0in 0in 0in 0in'><center><b>Package</b></td><td width=10% valign=center style='width:5%;background:#F7F0D9;padding:0in 0in 0in 0in 0in'><center><b>JTs</b></td>


$ sed 's/\;background:#F7F0D9\;padding\:0in 0in 0in 0in 0in//' f
<tr><td width=10%  style='width:5%'><center><b>Package</b></td><td width=10% valign=center style='width:5%;background:#F7F0D9;padding:0in 0in 0in 0in 0in'><center><b>JTs</b></td>


$ sed 's/\;background\:#F7F0D9\;padding\:0in 0in 0in 0in 0in//' f
<tr><td width=10%  style='width:5%'><center><b>Package</b></td><td width=10% valign=center style='width:5%;background:#F7F0D9;padding:0in 0in 0in 0in 0in'><center><b>JTs</b></td>


$

Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed syntax

Hi, How can i use sed command to modify a part of a variable containing "/" by another containing "/" like describe below: VAR="/app/share/eai" VAR1="/app/share" VAR2="/data/test" echo $VAR | sed 's/... ??? # using sed to replace $VAR1 in $VAR by $VAR2 ? (4 Replies)
Discussion started by: jo_aze
4 Replies

2. Shell Programming and Scripting

Help for Sed Syntax problem

I have one File named "txt_file" # cat txt_file <DBType>RT</DBType> <AppType>RT</AppType> -------------------------------------------------- I want replace "<AppType>RT</AppType>" to <AppType>XY</AppType> in txt_file and output redirect to Newfile ... (2 Replies)
Discussion started by: SanjayLinux
2 Replies

3. Shell Programming and Scripting

syntax for variables in sed

I always kind of wondered this but I have a variable that I want to use in a search and replace. Basically I want to search a file for the string in my variable and replace it with something fixed but I'm unsure of the variable rule in sed. Here's generally what I have: sed 's/$name/newname/g'... (15 Replies)
Discussion started by: eltinator
15 Replies

4. Shell Programming and Scripting

What syntax to use with sed c\

I know that I want to entirely replace line 3 in my file filename.txt. I have tried all sorts of variations of sed 3,3,c\replacement stuff\ filename.txt with no success. about the only thing that causes any reaction is sed 3,3c\\ filename.txt but it just prints out the whole file. ... (13 Replies)
Discussion started by: SusanDAC
13 Replies

5. Shell Programming and Scripting

Obscure sed extraction syntax

Hi, Could anyone clearly explain me the below sed construct in detail to get to know what it actually does? sed 's/\(* *\)//4' echo 'test;10;20' | sed 's/*;\(*\)/\1/' (1 Reply)
Discussion started by: royalibrahim
1 Replies

6. Shell Programming and Scripting

Explain following sed syntax please

Thanks to this forum I have managed to work out a solution to my problem and actually understand most of it, but one thing is confusing me and I am sure someone here can explain. I need to insert a piece of txt into a file. This txt is awk '{ sub(/$/,"\r"); print }' $JCL_WBB50103_EFTOUT >... (2 Replies)
Discussion started by: hukcjv
2 Replies

7. UNIX for Dummies Questions & Answers

sed - need help for syntax

Hello, here is what I've got : FILE='/OPERATIONNEL/SATURNE/CHAMPS/MASTER/ANA/SATURNE_1DAV_20080805_20080806_S3D_T_R20080806.NC ';;... (4 Replies)
Discussion started by: Aswex
4 Replies

8. Shell Programming and Scripting

sed syntax error

Hi, In the following excerpt of shell script code: I could not understand the sed syntax. Could anyone shed some light on this? configure_ssl() { jboss_conf_file=$1 echo "Configuring SSL for -" ${jboss_conf_file} isSSLSetup=`echo cat ${jboss_conf_file} | grep <Connector... (2 Replies)
Discussion started by: royalibrahim
2 Replies

9. Shell Programming and Scripting

Another sed Syntax Puzzle . . .

Greetings! Have a quick question for the community today; this time looking at a nifty little sed puzzle ;) Consider the following file content to be worked through:What needs to happen is theblock should be removed up to and including the following blank line, leavingI have bits and pieces... (8 Replies)
Discussion started by: LinQ
8 Replies

10. UNIX for Dummies Questions & Answers

Can sed use a file on the syntax?

Dear all, I need help, again. I would like to use a sed on a for. Is is possible to ask sed to call a file in the syntax? For exemple: sed "/Y/ s/number/X/" test_imput > test_output where Y is a file which inside there is one pattern only; Also X is a file with one... (6 Replies)
Discussion started by: lColli
6 Replies
DVIPDFM(1)							     DVIPDFMx								DVIPDFM(1)

NAME
dvipdfm - produce PDF files directly from DVI files SYNOPSIS
dvipdfm [options] file[.dvi] DESCRIPTION
In TeX Live, dvipdfm is another incarnation of dvipdfmx rather than a separate program. Compatibility is attempted as best as possible. (The change was made due to duplicated security and configuration issues arising repeatedly.) Please report problems with this dvipdfm to the dvipdfmx maintainers at dvipdfmx (at) ktug.or.kr. The program dvipdfm generates a PDF file from a DVI file. DVI files are the output format produced by TeX. Output from groff can be con- verted to DVI format using grodvi. The program dvipdfm recognizes several commonly used special commands, which are extensions to the DVI format. Specifically, it under- stands color specials, papersize specials, tpic specials (which allow it to be used with pic), hypertex specials, and some PostScript spe- cials. These extensions allow documents to contain color, figures, and hyperlinks. The program tries to mimic the behavior of dvips so that many macro packages produced for use with dvips will work with dvipdfm. Dvipdfm understands its own specific special commands to allow access to PDF features such as annotations and bookmarks. For issues related to bounding boxes (and hence image sizes), please see extractbb(1). OPTIONS
-c Ignore color specials. The -c toggles a flag that disables color special processing. Unless changed in the configuration file, that flag is off, and color specials are interpreted normally. The -c option may be used to produce a black and white document from a document containing color TeX special commands. -d Remove thumbnail images after including them. (See the -t option for more information.) -e Toggle partial font embedding flag. If partial font embedding is off, embedded fonts are fully embedded. The default, if not changed in the configuration file, is to embed only those glyphs actually used in the document. -f map_file Set the name of the font map file to map_file. The format of the font map file is documented in the Dvipdfm User's Manual. -l Select landscape mode. In other words, exchange the x and y dimensions of the paper. -m mag Magnify the input document by mag. -o name Generate PDF output file having the name name. By default, the name of the output file is file.pdf. -p paper Select the papersize by name (e.g., letter, legal, ledger, tabloid, a3, a4, or a5 ) -r size Set resolution of bitmapped fonts to size dots per inch. Bitmapped fonts are generated by the Kpathsea library, which uses Metafont. Bitmapped fonts are included as type 3 fonts in the PDF output file. -s page_specifications Select the pages of the DVI file to be converted. The page_specifications consists of a comma separated list of page_ranges: page_specifications := page_specification[,page_specifications] where page_specification := single_page|page_range page_range := [first_page]-[last_page] An empty first_page is implied to be the first page of the DVI file. An empty last_page is treated as the last page of the DVI file. Examples: -s 1,3,5 includes pages 1, 3, and 5; -s - includes all pages; -s -,- includes two copies of all pages in the DVI file; and -s 1-10 includes the first ten pages of the DVI file. -t Search for thumbnail images of each page in the directory named by the TMPDIR environment variable. The thumbnail images must be named in a specific format. They must have the same base name as the DVI file and they must have the page number as the extension to the file name. Dvipdfm does not generate the thumbnails itself, but it is distributed with a wrapper program named dvipdft that does so. -v Increase verbosity. Results of the -v option are cumulative (e.g., -vv ) increases the verbosity by two increments. -x x_offset Set the left margin to x_offset. The default left margin is 1.0in. The dimension may be specified in any units understood by TeX (e.g., bpt, pt, in, cm ) -y y_offset Set the top margin to y_offset. The default top margin is 1.0in. The dimension may be specified in any units understood by TeX (e.g., bpt, pt, in, cm ) -z compression_level Set the compression level to compression_level. Compressions levels range from 0 (no compression) to 9 (maximum compression) and cor- respond to the values understood by zlib. IMAGE BOUNDING BOXES
When including images with dvipdfm, their bounding boxes should be generated by running ebb, or extractbb -m. The result will be in an .bb file. When including images with dvipdfmx, their bounding boxes should be generated by running extractbb. The result will be in an .xbb file; the xbb information is the same as for the PDF format. ENVIRONMENT
Dvipdfm uses the kpathsea library for locating the files that it opens. Hence, the environment variables documented in the Kpathsea library documentation influence dvipdfm. Dvipdfm also reads the following environment variables: TMP The directory to search for thumbnail images of each page. FILES
The precise location of the following files is determined by the Kpathsea library configuration. The location may be determined by using kpsewhich, e.g., kpsewhich -progname=dvipdfm -format='other text files' config config Startup options t1fonts.map The default font map file (this name may be changed in the config file). *.tfm TeX font metrics *.vf TeX virtual font files *.pfb PostScript Type 1 font files texmf.cnf The Kpathsea library configuration file. The location of this file may be found by typing kpsewhich texmf.cnf SEE ALSO
dvipdft(1), tex(1), dvips(1), groff(1), grodvi(1), pic(1), extractbb(1), and the Kpathsea library info documentation. AUTHOR
Mark A. Wicks. But for the version in TeX Live, all bugs and other reports should go to the dvipdfmx maintainers at dvipdfmx (at) ktug.or.kr. 20120420 28 April 2011 DVIPDFM(1)
All times are GMT -4. The time now is 02:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy