As far as i can see "sed" should be up to the task: go through your mapper file, one line at a time. There are 4 bytes in every line:
1. a "src" character
2. a ">"
3,4. a "target" character.
It is easy to divide in 2 shell variables:
Now use these variables to replace all original characters to translated ones. You have to mark you original characters somehow to make sure you don't translate characters twice during various passes. In this case we escape all characters initially with a backslash and remove these as we translate. This way we can - by searching for backslashes in the resultfile - find out if our mapper file is completely covering the input. If still backslashes are there some characters didn't get translated.
This silently presupposes the backslash "\" not to be used in your inputfile. Replace it with another (unused) character if this is not the case.
Hi guys,
I have one file with duplicate string. I want to replace all the occurance of that string with some other string.
How can I do that in vi editor?
Malay Maru (3 Replies)
i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Hi,
Ive spent ages trying to find an explanation for how to do this on the web, but now feel like I'm :wall:
I would like to change each occurence (there are many within my script) of the following:
to
in Vim. I know how to search and replace when it is just single lines... (2 Replies)
Hi Experts,
I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Hello,
Some time ago a helpful awk file was provided on the forum which I give below:
NR==FNR{A=$0;next}{for(j in A){split(A,P,"=");for(i=1;i<=NF;i++){if($i==P){$i=P}}}}1
While it works beautifully on English and Latin characters i.e. within the ASCII range of 127, the moment a character beyond... (6 Replies)
Hello,
I looked for all search and replace routines in the forum but could find none which meets my requirement.
I have a file in which a set of mappers are provided. The structure is as under
a=b
c=d
e=f
A simplistic example from English and French would make this clear:
John=Jean... (2 Replies)
Hi Team,
I am new to unix, please help me in this.
I have a file named properties.
The content of the file is :
##Mobile props
east.url=https://qa.east.corp.com/prop/end
west.url=https://qa.west.corp.com/prop/end
south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Hi,
more data.txt
more srstring.sh
input="data.txt"
while IFS= read -r var
do
startdirectory=$loc
search=$(echo $var | awk -F'=' '{print $1}')
replace=$(echo $var | awk -F'=' '{print $2}')
find "/tmp/config" -type f -exec grep -l "$search" {} + |
while read file
do if sed -e... (9 Replies)
i have a real data prod file with 80+ fields containing 1k -2k records. i have to extract say 12 columns out of this which are sensitive fields along with one primary key say SEQ_ID (like DOB,account no, name, SEQ_ID, govtid etc) in a lookup file. i have to replace these sensitive fields in... (11 Replies)
Discussion started by: megh12
11 Replies
LEARN ABOUT SUSE
multipath
MULTIPATH(8) Linux Administrator's Manual MULTIPATH(8)NAME
multipath - Device mapper target autoconfig
SYNOPSIS
multipath [-v verbosity] [-d] [-h|-l|-ll|-f|-t|-F] [-p failover|multibus|group_by_serial|group_by_prio|group_by_node_name] [device]
DESCRIPTION
multipath is used to detect multiple paths to devices for fail-over or performance reasons and coalesces them
OPTIONS -v level
verbosity, print all paths and multipaths
0 no output
1 print the created or updated multipath names only, for use to feed other tools like kpartx
2 + print all info : detected paths, coalesced paths (ie multipaths) and device maps
-h print usage text
-d dry run, do not create or update devmaps
-l show the current multipath topology from information fetched in sysfs and the device mapper
-ll show the current multipath topology from all available information (sysfs, the device mapper, path checkers ...)
-f flush a multipath device map specified as parameter, if unused
-F flush all unused multipath device maps
-t print internal hardware table to stdout
-p policy
force maps to specified policy:
failover 1 path per priority group
multibus all paths in 1 priority group
group_by_serial
1 priority group per serial
group_by_prio
1 priority group per priority value. Priorities are determined by callout programs specified as a global, per-con-
troller or per-multipath option in the configuration file
group_by_node_name
1 priority group per target node name. Target node names are fetched in /sys/class/fc_transport/target*/node_name.
device update only the devmap the path pointed by device is in. device is in the /dev/sdb (as shown by udev in the $DEVNAME variable) or
major:minor format. device may alternatively be a multipath mapname
SEE ALSO multipathd(8), multipath.conf(5), kpartx(8), udev(8), dmsetup(8)hotplug(8)AUTHORS
multipath was developed by Christophe Varoqui, <christophe.varoqui@free.fr> and others.
July 2006 MULTIPATH(8)