Sponsored Content
Top Forums Shell Programming and Scripting Find the position of a string and replace with another string Post 302278677 by summer_cherry on Wednesday 21st of January 2009 01:01:39 AM
Old 01-21-2009
Code:
echo "leoisleoisleo" | sed 's/leo/LEO/2'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find a position and print some string in the next and same position

I need a script for... how to find a position of column data and print some string in the next line and same position position should find based on *HEADER8* in text for ex: ord123 abs 123 987HEADER89 test234 ord124 abc 124 987HEADER88 test235 ... (1 Reply)
Discussion started by: naveenkcl
1 Replies

2. Shell Programming and Scripting

Search for a string and replace the searched string in the same position

Hi All, My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Discussion started by: ganesh_248
15 Replies

3. UNIX for Dummies Questions & Answers

Search for a string and replace the searched string in the same position in samefile

Hi All, My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Discussion started by: ganesh_248
27 Replies

4. Shell Programming and Scripting

Replace character in certain position in a string

Hello everyone this is my first post of many to come :) I am writing a script and in this script at one point i need to replace a character in a particular position in a string for example: in the string "mystery" i would need to replace the 3rd position to an "r" so the string becomes... (3 Replies)
Discussion started by: snipaa
3 Replies

5. UNIX for Dummies Questions & Answers

Search a string in the file and then replace another string after that position

Hi I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall: E.g: Actual File content: Hello Name: Nitin Raj Welcome to Unix... (4 Replies)
Discussion started by: dashing201
4 Replies

6. Shell Programming and Scripting

Using sed to replace a string in a specific position

I asked this before, but my problem got more complicated. Heres what I am trying to do: I'm trying to replace a string at a certain location with another string. Heres the file I'm trying to change: \E I want to replace the escape code at the 3rd line, 2nd column with this escape code... (3 Replies)
Discussion started by: tinman47
3 Replies

7. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

8. Shell Programming and Scripting

HPUX find string in directory and filetype and replace string

Hi, Here's my dilemma. I need to replace the string Sept_2012 to Oct_2012 in all *config.py files within the current directory and below directories Is this possible? Also I am trying to find all instances of the string Sept_2012 within files in the current directory and below I have... (13 Replies)
Discussion started by: pure_jax
13 Replies

9. Shell Programming and Scripting

Search for a string at a particular position and replace with blank based on position

Hi, I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies

10. Shell Programming and Scripting

Find a string and its position in a line from another string

Hello guys, would you please help me with this? this is the line inside a file: first line Something Today YYDDPPSVXIPYYY0XXXOFFS00000000000? I'd like to find the position of string XXX from string PYYY In the example above XXX starts from 6th position from PYYY desired... (4 Replies)
Discussion started by: netrom
4 Replies
sane-leo(5)						   SANE Scanner Access Now Easy 					       sane-leo(5)

NAME
sane-leo - SANE backend for LEO Technologies scanners DESCRIPTION
The sane-leo library implements a SANE (Scanner Access Now Easy) backend that provides access to some LEO SCSI flatbed scanners. This back- end should be considered beta-quality software! LEO scanners were also sold under the Across Technologies brand. The scanners that should work with this backend are: Vendor Model status ---------------------- ----------- Across FS-1130 tested Leo S3 tested The options the backend supports can either be selected through command line options to programs like scanimage or through GUI elements in xscanimage or xsane. If you have any strange behavior, please report to the backend maintainer or to the SANE mailing list. Valid command line options and their syntax can be listed by using scanimage --help -d leo Scan Mode --mode selects the basic mode of operation of the scanner valid choices are Black & White , Grayscale and Color The Black & White mode is black and white only (1 bit). Grayscale will produce 256 levels of gray (8 bits). Color will produce a 24 bits color image. --resolution selects the resolution for a scan. The scanner can do all resolutions between 1 and 300, in increments of 1. Geometry options -l -t -x -y control the scan area: -l sets the top left x coordinate, -t the top left y coordinate, -x selects the width and -y the height of the scan area. All parameters are specified in millimeters by default. Enhancement options --custom-gamma (grayscale and color mode only) allows the user to specify a gamma table (see the next 3 parameters). --red-gamma-table (color mode only) can be used to download a user defined gamma table for the red channel. The table must be 256 bytes long. --green-gamma-table (color mode only) can be used to download a user defined gamma table for the green channel. The table must be 256 bytes long. --blue-gamma-table (color mode only) can be used to download a user defined gamma table for the blue channel. The table must be 256 bytes long. --halftone (Black & White only) select the halftone mask to use. Possible values are Diamond , 8x8 Coarse Fatting , 8x8 Fine Fatting , 8x8 Bayer and 8x8 Vertical Line --preview requests a preview scan. The resolution used for that scan is 28 dpi and the scan area is the maximum allowed. The scan mode is user selected. The default is "no". CONFIGURATION FILE
The configuration file /etc/sane.d/leo.conf supports only one information: the device name to use (eg /dev/scanner). FILES
/usr/lib64/sane/libsane-leo.a The static library implementing this backend. /usr/lib64/sane/libsane-leo.so The shared library implementing this backend (present on systems that support dynamic loading). ENVIRONMENT
SANE_DEBUG_LEO 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. LIMITATIONS
The windows TWAIN driver has many more options than this SANE backend. However they are only software adjustments. This backend only imple- ments what the scanner can support. BUGS
None known. SEE ALSO
sane-scsi(5), scanimage(1), xscanimage(1), xsane(1), sane(7) AUTHOR
The package is actively maintained by Frank Zago. http://www.zago.net/sane/#leo 11 Jul 2008 sane-leo(5)
All times are GMT -4. The time now is 05:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy