How to replace character in a file based on another file.?
Hi Gurus,
I have really hard job need you guys to help.
i have two files
one is data file, one is instruction file like below
the requirement is based on the instruction file, replace certain charactors with 'X',
in instruction file the first column is position in the string, second the charactors need to be replace. the third column is inidcator if the charactor need to be replaced or not. "o" means not replace, "r" means replace.
the instruction file can change as
this means from begining of the line until 10th charactor not replacement, from 10th to 15th replace with X, from 16th to 20 no replacement.
the expected result as following:
000000001xxxxxx15482xxxxxxxxxxabc BC15
000000001xxxxxx31548xxxxxxxxxxfefg DB15
Hello,
Can someone kindy help me solve this problem..I am using SunOS shell script
I got a file A with following content:
This is my correct document. I wrote 111
This is my incorrect word , 222
This is my wrong statement 333
This is my correct document 444
This is my correct document 555... (9 Replies)
Hi All,
I have file contains the following information.
chem00s4.mis.amat.com ] Critical 3/21
chem00s4.mis.amat.com ] Normal 3/22
chem00s4.mis.amat.com ] Normal 3/23
chem00s4.mis.amat.com ] Normal 3/24
chem00s4.mis.amat.com ] Critical 3/25... (2 Replies)
I need some help with a unix script to mv image files to subdirectories based on the 1st character of the filename. See example below...
/images/main
1191.jpg
9999.jpg
A101.jpg
A102.jpg
B201.jpg
c333.jpg
...
Z999.jpg
I would like to move to the following:
... (11 Replies)
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
i have a reqirement to adjust the data in a file based on a perticular character
the sample data is as below
483PDEAN CORRIGAN 52304037528955WAGES 50000
89BP ABCD MASTER352 5434604223735428 4200
58BP SOUTHERN WA848 ... (1 Reply)
Hi
I have a large txt file on my AIX server and I need to replace some text using two other files. So filename1 has about 500 lines similar to:
txtcode SYStem100
I have the string I want to change in string2 and the new stringname in string3. Does anyone know a way of doing this? I have... (1 Reply)
Hi,
I have a requirement where I need to combine two lines in a file based on first character of each line in a file.
Please find the sample content of the file below:
Code:
_______________________
5, jaya, male, 4-5-90, single
smart
6, prakash, male, 5-4-84, married
fair
7, raghavi,... (1 Reply)
Hi,
I have a requirement where I need to combine two lines in a file based on first character of each line in a file.
Please find the sample content of the file below:
Code:
_______________________
5, jaya, male, 4-5-90, single
smart
6, prakash, male, 5-4-84, married
fair
7, raghavi,... (1 Reply)
I have a data like this in a file.
05/08/2017,U,01,116326001
05/08/2017,U,01,116226001
05/08/2017,U,01,116726323
05/08/2017,U,01,116236001
I want replace the date(1st column) of all records.
Ex: 05/08/2017 to 04/02/2017
Please use CODE tags when displaying sample input, sample output,... (1 Reply)
Discussion started by: Artlk
1 Replies
LEARN ABOUT OSF1
ppmtosixel
ppmtosixel(1) General Commands Manual ppmtosixel(1)NAME
ppmtosixel - convert a portable pixmap into DEC sixel format
SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC
LJ250 color inkjet printer.
If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table
begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file.
OPTIONS -raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com-
pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni-
tude larger than a compressed file and prints much slower.
-margin
If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci-
fied, a 1.5 inch left margin will offset the image.
PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was
greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the
color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation.
SEE ALSO ppm(5)AUTHOR
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)