Sponsored Content
Top Forums Shell Programming and Scripting Multiple Replacement in a Text File in one operation (sed/awk) ? Post 302978652 by dae on Tuesday 2nd of August 2016 08:36:41 AM
Old 08-02-2016
Excellent Scrutinizer !!! Smilie

Thanks a lot,

Didier.

Next step: understand how it is running, not obvious to me ! Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Awk/Sed One liner for text replacement

Hi group, I want to replace the occurance of a particular text in a paragraph.I tried with Sed,but Sed only displays the result on the screen.How can i update the changes in the original file??? The solution should be a one liner using awk and sed. Thanks in advance. (5 Replies)
Discussion started by: bishnu.bhatta
5 Replies

2. UNIX for Dummies Questions & Answers

Sed text replacement issue.

Hi, Im trying to find and replace text within a unix file using sed. The command that i have been using is sed '/,null,/ s//, ,/g' result.txt>result.tmp for replacing ",null," with ", ,". But this only replaces the first occurrance of ,null, in every line. I want to do it globally. It... (7 Replies)
Discussion started by: sohaibs
7 Replies

3. Shell Programming and Scripting

sed xml file multiple line replacement

I have a file called config.xml, it's a simple xml file, and I need use sed/awk to erase some lines. <machine xsi:type="unix-machineType"> <name>server1</name> <node-manager> <name>server1</name> <listen-address>server1</listen-address> </node-manager> ... (3 Replies)
Discussion started by: cbo0485
3 Replies

4. Shell Programming and Scripting

How to replace multiple text in a file using sed

can anyone please help me in the below scenario: File1: Hello1 Hello1 i want to use sed to replace multiple occurances of Hello1 in file 1 to welcome. Thanks a ton for the help (9 Replies)
Discussion started by: amithkhandakar
9 Replies

5. Shell Programming and Scripting

Block of text replacement using sed

Hi, I have a requirement in which i need to replace text as below - <stringProp name="Recipe">&lt;AddGroup Name=&quot;1001&quot; Path=&quot;ServiceAdministration/Controls/1001/ServiceSwitches&quot;&gt; &lt;Param Name=&quot;AttributeName&quot; Value=&quot;HeaderManipRspIngressRuleSet&quot; Type=&quot;String&quot; /&gt; &lt;Param Name=&quot;Value&quot;... (0 Replies)
Discussion started by: abhitanshu
0 Replies

6. Shell Programming and Scripting

Complex string operation (awk, sed, other?)

I have a file that contains RewriteRules for 200 countries (2 examples for 1 country below): RewriteRule ^/at(/|/index.html|)$ http://%{HTTP_HOST}/locate/index.html?locale=de_AT #& RewriteRule ^/at_english(/|/index.html|)$ http://%{HTTP_HOST}/locate/index.html?locale=en_AT I have... (5 Replies)
Discussion started by: usshadowop
5 Replies

7. Shell Programming and Scripting

Text replacement with awk or sed?

Hi guys, I worked for almost a half-day for the replacement of some text automatically with script. But no success. The problem is I have hundred of files, which need to be replaced with some new text. It's a painful work to work manually and it's so easy to do it wrong. For example, I... (2 Replies)
Discussion started by: liuzhencc
2 Replies

8. Shell Programming and Scripting

Solution for replacement of 4th column with 3rd column in a file using awk/sed preserving delimters

input "A","B","C,D","E","F" "S","T","U,V","W","X" "AA","BB","CC,DD","EEEE","FFF" required output: "A","B","C,D","C,D","F" "S", T","U,V","U,V","X" "AA","BB","CC,DD","CC,DD","FFF" tried using awk but double quotes not preserving for every field. any help to solve this is much... (5 Replies)
Discussion started by: khblts
5 Replies

9. Shell Programming and Scripting

sed text replacement

Hello, I'm using Bash and Sed to replace text within a text file (1.txt) twice in one script. Using a for loop I'm initially replacing any 'apple' words with the variable 'word1' ("leg). I'm then using another for loop to replace any 'apple' words with the variable 'word2' ("arm"). This task is... (2 Replies)
Discussion started by: Flip-Flop
2 Replies

10. UNIX for Beginners Questions & Answers

How to find=grep or maybe sed/awk for multiple lines of text?

Hi, I am running the following: PASS="username/password" sqlplus -s << EOF | grep -v "^$" $PASS set feedback off set heading off set termout off select name from v\$database ; exit EOF Which gives ERROR: ORA-28002: the password will expire within 5 days PSMP1 (1 Reply)
Discussion started by: newbie_01
1 Replies
sane-coolscan(5)					   SANE Scanner Access Now Easy 					  sane-coolscan(5)

NAME
sane-coolscan - SANE backend for Nikon film-scanners ABOUT THIS FILE
This file is a short description of the coolscan-backend for sane! DESCRIPTION
The sane-coolscan library implements a SANE backend that provides the interface to the following Nikon Coolscan Film scanners: Nikon LS20, LS30, LS1000, LS2000. Even though the backend has worked for a number of people, there are still some problems, especially in combination with some SCSI card/drivers (AHA-1505/aha152x.o) and the autofocus command. You should consider this backend 'alpha' and be careful when using it the first time. CONFIGURATION
The configuration file for this backend resides in /etc/sane.d/coolscan.conf. Its contents is a list of device names that correspond to Nikon Coolscan scanners. Empty lines and lines starting with a hash mark (#) are ignored. A sample configuration file is shown below: #scsi Vendor Model Type scsi Nikon * Scanner /dev/scanner The special device name must be a generic SCSI device or a symlink to such a device. To find out to which device your scanner is assigned and how you have to set the permissions of that device, have a look at sane-scsi. SCSI ADAPTER TIPS
Some SCSI-adapters and low-level SCSI drivers do not work correctly with this backend and the Coolscan scanners. These systems hang when the autofocus command is send to the Scanner. To see a list of which card/driver combinations work or dont work have a look at: http://andreas.rick.free.fr/sane/autofocus.html. FILES
The backend configuration file: /etc/sane.d/coolscan.conf The static library implementing this backend: /usr/lib64/sane/libsane-coolscan.a The shared library implementing this backend: /usr/lib64/sane/libsane-coolscan.so (present on systems that support dynamic loading) ENVIRONMENT
SANE_DEBUG_COOLSCAN If the library was compiled with debug support enabled, this environment variable controls the debug level for this backend. E.g., a value of 128 requests all debug output to be printed. Smaller levels reduce verbosity: SANE_DEBUG_COOLSCAN values Examples: on bash: export SANE_DEBUG_COOLSCAN=8 on csh: setenv SANE_DEBUG_COOLSCAN 8 BUGS
The autofocus command does not work with some SCSI card/driver combinations The gamma table is not implemented for the LS1000 yet. The dust-removal is not working yet SEE ALSO
http://andreas.rick.free.fr/sane/ The homepage of this backend http://www.sema.be/coolscan/ The original version of the coolscan backend by Didier sane(7), sane-scsi(5) THANKS TO
Didier Carlier - For writing the original Coolscan backend (without it I would not have started this) Oliver Rauch - For adapting xsane so quickly to the infrared stuff. All the other people working on SANE. AUTHOR
Andreas Rick EMAIL-CONTACT andreas.rick@free.fr 13 Jul 2008 sane-coolscan(5)
All times are GMT -4. The time now is 02:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy