Sponsored Content
Top Forums Shell Programming and Scripting Cut output to same byte position Post 302097201 by anbu23 on Wednesday 22nd of November 2006 08:36:13 AM
Old 11-22-2006
Code:
echo "ABC123DEF" | sed "s/\(.\{2\}\)\(.\{3\}\)\(.\{3\}\).*/\1   \3 /"

sed "s/\(.\{2\}\)\(.\{3\}\)\(.\{3\}\).*/\1 \3 /"

Match the first two char

sed "s/\(.\{2\}\)\(.\{3\}\)\(.\{3\}\).*/\1 \3 /"

Match next three char

sed "s/\(.\{2\}\)\(.\{3\}\)\(.\{3\}\).*/\1 \3 /"

Match next three char followed by the above three char

.* match till end of the line

I added three blanks between \1 and \3 and one blank after \3 to replace the respective char in input with blanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

byte count and cut command

1. Is there a way to count the number of bytes of a variable? example: abc@yahoo.com is 13 bytes 2. Cut command only allows one byte for delimiter example: cut -f1 -d'.' delimited by period. Is there a way to have two or more characters in the delimiter field? thanks in adavance. :) (4 Replies)
Discussion started by: hemangjani
4 Replies

2. Shell Programming and Scripting

Cut position as a variable

Hi All, I wish to cut an input by using the below command but i would want to have the cut position as a variable. For eg, the position number is 11 now and i wish that this number is being assigned to a variable before putting into the cut function. Can this be done ? Can any expert help?... (1 Reply)
Discussion started by: Raynon
1 Replies

3. Shell Programming and Scripting

Check if 2 files are identical byte-to-byte?

In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server. For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match. Please... (4 Replies)
Discussion started by: krishmaths
4 Replies

4. Shell Programming and Scripting

Remove a byte(Last byte from the last line)

Hi All Can anyone please suggest me how to remove the last byte from a falt file .This is from the last line's last BYTE. Please suggest me something. Thank's and regards Vinay (1 Reply)
Discussion started by: vinayrao
1 Replies

5. Shell Programming and Scripting

Perl- Output file is always 0 byte

Hi all, I am new to perl programming. However i have a script that connects to the database and spools that into an output file. Strange thing is that sometimes this script works and sometimes the ouput spool file is always 0 byte. I have verified the sql query and the query always returns... (5 Replies)
Discussion started by: amit1_x
5 Replies

6. Shell Programming and Scripting

Cut multiple data based on character position

How to extract multiple data based on character position. I need to fetch from 7-9 and 22-26 and there is no delimiter for 22-26 since it is part of the column. The file may have more than 1000 character long.I managed to pull any one but not both for example test data 12345 zxc vbnmlk... (1 Reply)
Discussion started by: zooby
1 Replies

7. Shell Programming and Scripting

How to cut line from certain position?

Hi Gurus, I want to cut my file from 27th charactor to the end of line. can anybody give some unix command to do this. Thanks in advance (3 Replies)
Discussion started by: ken6503
3 Replies

8. UNIX for Beginners Questions & Answers

Cut two individual position and summ

Hi All, I am having a huge file file. I need to cut the below column and do the below calculation I did the below command and able to do on full databased no on the individual based any help on doing each row by row cut -c 52-56 myfile | awk '{total = total + $1}END{print total}'... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies

9. UNIX for Beginners Questions & Answers

Print byte position of extended ascii character

Hello, I am on AIX. When I encounter extended ascii characters and special characters on a file I need to print.. Byte position, actual character and line number. Is there a simple command that can give me the above result ? Thanks in advance (38 Replies)
Discussion started by: rosebud123
38 Replies

10. Shell Programming and Scripting

Cut command with dynamic passing of delimiter and position values

Hi All, We have a requirement of picking nth position value by using cut command. value would be delimited by any symbols. We have to pass delimited value and postition to get the value in a string. ex. echo "A,B,C,D,E" |cut -d "," -f3 echo "A|B|C|D|E"|cut -d "|" -f2 Kindly frame the... (5 Replies)
Discussion started by: KK230689
5 Replies
GIMPPRINT-COLOR(7)					      Gimp-Print Manual Pages						GIMPPRINT-COLOR(7)

NAME
gimpprint-color - Gimp-Print color balancing DESCRIPTION
Gimp-Print includes several color balancing controls. These may be used to adjust the original image's brightness and contrast and gamma, and the density and saturation of the output, as well as the individual cyan, magenta and yellow levels. COLOR BALANCING
Cyan Magenta Yellow The range of values is 0.0 - 4.0, and defaults to 1.0. These three options allow specification of the cyan, magenta, and yellow levels independently, for rebalancing the levels. Normally, these should be adjusted to yield neutral gray, but they can be used for other effects. Brightness The range of values is 0.0 - 2.0, and defaults to 1.0. This adjusts the brightness of the image. 0.0 gives a fully black image; 2.0 gives a fully white image. Values greater than 1 will result in black not being solid and highlights turning white; values less than 1 will result in white not being perfectly clear and shadows turning black. Contrast The range of values is 0.0 - 4.0, and defaults to 1.0. Adjust the contrast of the image. 0.0 gives a solid gray for the entire image, the exact gray depending upon the brightness chosen. Gamma The range of values is 0.1 - 4.0, and defaults to 1.0. Adjust the gamma of the image, over and above the printer-specific correc- tion. Gamma less than 1.0 will result in a darker image; gamma greater than 1.0 will result in a lighter image. Unlike brightness, gamma adjustment does not change the endpoints; it merely changes the shape of the input->output curve. Density The range of values is 0.1 - 2.0, and defaults to 1.0. Adjust the amount of ink deposited on the paper. If you've chosen the cor- rect paper type and you're getting ink bleeding through the paper or puddling, try reducing the density to the lowest value you can while still achieving solid black. If you're not getting solid black, even with the contrast and brightness at 1.0, try increasing the density. All of the printers supported here actually need less than 100% ink density in most cases, so the actual density is something other than the nominal density setting. The effective density setting cannot go above 100%, so if a value specified will result in an excessively high density level, it will be silently limited to 1.0. Saturation The range of values is 0.0 - 9.0, and defaults to 1.0. Adjust the brilliance of colors. 0.0 results in pure grayscale; using this with Color=1 is one way of getting grayscale (see below under "Color" for a full discussion). Saturation of less than 1.0 results in more muted colors; saturation of greater than 1.0 results in more vibrant colors. Very high saturation often results in very strange effects, including posterization and banding that might not be expected. For normal purposes, the saturation should gener- ally be less than 1.5. COPYRIGHT
Copyright (C) 2001 Michael Sweet (mike@easysw.com) and Robert Krawitz (rlk@alum.mit.edu) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This manual page was written by Roger Leigh (roger@whinlatter.uklinux.net) SEE ALSO
gimpprint-dithers(7), gimpprint-imagetypes(7), gimpprint-inktypes(7), gimpprint-mediasizes(7), gimpprint-mediasources(7), gimpprint-medi- atypes(7), gimpprint-models(7), gimpprint-resolutions(7). Version 4.2.4 25 Nov 2002 GIMPPRINT-COLOR(7)
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy