Sponsored Content
Top Forums Shell Programming and Scripting looking for expert sed/script help for translation/substitution Post 302452426 by Bashingaway on Friday 10th of September 2010 10:20:30 AM
Old 09-10-2010
how many records are in each file roughly?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Substitution using SED

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as... (2 Replies)
Discussion started by: shubhranshu
2 Replies

2. Shell Programming and Scripting

SED Substitution

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as well to... (1 Reply)
Discussion started by: shubhranshu
1 Replies

3. Shell Programming and Scripting

SED: language translation of a program

Hi people! I'm a bit noob at sed so I ask you for some help :( I'm trying to automatically translate some files of a program, which has some lines of this style: $string = 'A text line'; For example in this line: $string = 'The date entered: <strong>$a</strong> does not correspond... (2 Replies)
Discussion started by: pdmiguel
2 Replies

4. Shell Programming and Scripting

sed substitution

Hi I am trying to do a text insertion in a text file at a particular line number in a shell script. However its not working. sed '122i\ > for j in \`echo $MyList\` ; do perl -pi -e\'s#01\/01\/2009#01\/01\/2011#\' $j ; done' $HOME/MyScript.ksh The Actual line to be inserted at line 122... (5 Replies)
Discussion started by: som.nitk
5 Replies

5. Shell Programming and Scripting

sed substitution

Using sed I'm trying to replace 'string' with ']' while retaining case and ignoring words with 'string' in it along with additional characters like 'strings' and those which already contain the ] wrapper. I'm hoping to do it with sed and the right expression, if possible. Example: Apple... (2 Replies)
Discussion started by: tom.lee
2 Replies

6. UNIX for Dummies Questions & Answers

Help with sed substitution

I'm a noob to unix, and I have a line of data like the following: title=Boston|tcolor=green|desc=Large city in New England|url=www.boston.com Is there a way to change a field value with sed substitution? (i.e. change tcolor=green to tcolor=blue) I figured out: sed... (19 Replies)
Discussion started by: stabby
19 Replies

7. Shell Programming and Scripting

Substitution with sed

I have a file with some numbers having single quotes around them which I want to remove. i.e. '923930' -> 23930 If it can be done without using sed thats fine. I have tried with sed but can't think how to replace this pattern on only the numbers (13 Replies)
Discussion started by: user_invalid
13 Replies

8. UNIX for Dummies Questions & Answers

sed substitution

How can you use sed with a line of code that reads: 67899:Bill:Williams:Maple Dr.:45908600 Let us say we want to replace Maple Dr. with Oak St. (1 Reply)
Discussion started by: yonkers062986
1 Replies

9. Shell Programming and Scripting

sed variable substitution in a script

Hi I am trying to do the following in a script find a string and add in a block of text two lines above on the command line this works fine #/usr/bin/cat /usr/local/etc/dhcpd.conf_subnet | /usr/xpg4/bin/sed -n -e '1h;1\!H;${;g;s/}.*#END of 10.42.33.0/#START of RANGE $dstart\:option... (3 Replies)
Discussion started by: eeisken
3 Replies

10. Shell Programming and Scripting

regarding TCL expert SSH script

Hi, I am in learning curve in the Tcl/expert language. I have the following program for ssh #!/dsbutest/autotest/ats_current/bin/expect set UserID "user" set Password "key" set remotehost spawn ssh -l $UserID $remotehost expect -re ".*" send "yes\r" #this one adding the RSA key... (1 Reply)
Discussion started by: mathiaga
1 Replies
utf8trans(1)							     docbook2X							      utf8trans(1)

NAME
utf8trans - Transliterate UTF-8 characters according to a table SYNOPSIS
utf8trans charmap [file]... DESCRIPTION
utf8trans transliterates characters in the specified files (or standard input, if they are not specified) and writes the output to standard output. All input and output is in the UTF-8 encoding. This program is usually used to render characters in Unicode text files as some markup escapes or ASCII transliterations. (It is not in- tended for general charset conversions.) It provides functionality similar to the character maps in XSLT 2.0 (XML Stylesheet Language - Transformations, version 2.0). OPTIONS
-m, --modify Modifies the given files in-place with their transliterated output, instead of sending it to standard output. This option is useful for efficient transliteration of many files at once. --help Show brief usage information and exit. --version Show version and exit. USAGE
The translation is done according to the rules in the 'character map', named in the file charmap. It has the following format: 1. Each line represents a translation entry, except for blank lines and comment lines, which are ignored. 2. Any amount of whitespace (space or tab) may precede the start of an entry. 3. Comment lines begin with #. Everything on the same line is ignored. 4. Each entry consists of the Unicode codepoint of the character to translate, in hexadecimal, followed one space or tab, followed by the translation string, up to the end of the line. 5. The translation string is taken literally, including any leading and trailing spaces (except the delimeter between the codepoint and the translation string), and all types of characters. The newline at the end is not included. The above format is intended to be restrictive, to keep utf8trans simple. But if a XML-based format is desired, there is a xmlcharmap2utf8trans script that comes with the docbook2X distribution, that converts character maps in XSLT 2.0 format to the utf8trans format. LIMITATIONS
o utf8trans does not work with binary files, because malformed UTF-8 sequences in the input are substituted with U+FFFD characters. Howev- er, null characters in the input are handled correctly. This limitation may be removed in the future. o There is no way to include a newline or null in the substitution string. AUTHOR
Steve Cheng <stevecheng@users.sourceforge.net>. docbook2X 0.8.8 3 March 2007 utf8trans(1)
All times are GMT -4. The time now is 09:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy