12-03-2009
This User Gave Thanks to ahmad.diab For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I must remove hex characters 0A and 0D from several fields within an MS Access Table. Since I don't think it can be done in Access, I am trying here.
I am exporting a Table from Access (must be fixed length fields, I think, for my idea to work here) into a text format.
I then want to run a... (2 Replies)
Discussion started by: BAH
2 Replies
2. HP-UX
Hi,
Whats the command or how do you display the hexadecimal characters of an ascii file.
thanks
Bud (2 Replies)
Discussion started by: budrito
2 Replies
3. UNIX for Dummies Questions & Answers
Hi, I have a script for replacing bad characters in filenames
for f in *; do mv $f `echo $f | tr '+' '_'`
done;
this replaces + for _
But I need to replace all bad characters ? / % + to _
Pls how can i do this in one script ? (3 Replies)
Discussion started by: palmer18
3 Replies
4. Programming
:b:Guys,
Can some body throw some light on this please.....
sprintf(req_line1, "%c%s%c", '\x0b',"TESTING1",'\x0d');
sprintf(req_line2, "%s%c", "TESTING2", '\x0d');
sprintf(req_line3, "%s%c", "Testing3", '\x0d');
sprintf(req_line4, "%s%c%c%c", "Testing4", '\x0d', '\x1c', '\x0d');
... (6 Replies)
Discussion started by: sudharma
6 Replies
5. Shell Programming and Scripting
Hi,
I am a bit stuck with displaying characters. I am having values like below in the proper displayable characters. which I would want to print the actual value on the right hand side. I dont want to create an array because I would have to create 255 different values. isnt there another way of... (17 Replies)
Discussion started by: ahmedwaseem2000
17 Replies
6. Shell Programming and Scripting
Hello,
Yesterday I was looking for a way to grep for a tab in the shell, and found this solution in several places:
grep $'a' # Grep for the letter 'a' between two tabs
I'm fine with most of this, but I don't understand what the $ (dollar sign) before the first quote does. It doesn't work... (7 Replies)
Discussion started by: mregine
7 Replies
7. UNIX for Dummies Questions & Answers
I have the following file consisting of dates and sample measurements:
05��Oct��2010 1.31��
06��Oct��2010 1.32��
07��Oct��2010 1.31��
The hex characters are \xc2\xa0 in sequence.
I have tried to remove the characters as follows:
sed -i '' -e 's/\xc2\xa0//g' file.dat
and as follows... (6 Replies)
Discussion started by: figaro
6 Replies
8. Shell Programming and Scripting
sed -e "s// /g" old.txt > new.txt
While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies
9. HP-UX
Hi guys,
First off, i'm a complete noob to UNIX and LINUX so apologies if I don't understand the basics!
I have a file which contains a hex value of '0D' at the end of each line when I look at it in a hex viewer.
I need to change it so it contains a hex value of '0D0A0A'
I thought... (10 Replies)
Discussion started by: AndyBSG
10 Replies
10. Shell Programming and Scripting
Hi Forum.
I'm running the following awk command to extract the suffix value (pos 38) from the "AM00" record and append to the end of the "AM01" record.
awk 'substr($0,13,4)=="AM00" {SUFFIX = substr($0,38,2)} substr($0,13,4)=="AM01" {$0 = $0 SUFFIX} 1' before.txt > after.txt
Before.txt:... (2 Replies)
Discussion started by: pchang
2 Replies
LEARN ABOUT DEBIAN
color::library::color
Color::Library::Color(3pm) User Contributed Perl Documentation Color::Library::Color(3pm)
NAME
Color::Library::Color - Color entry for a Color::Library color dictionary
METHODS
$id = $color->id
Returns the id of the color
A color id is in the format of <dictionary_id:color_name>, e.g.
svg:aliceblue
x11:bisque2
nbs-iscc-f:chromeyellow.66
vaccc:darkspringyellow
$name = $color->name
Returns the name of the color, e.g.
aliceblue
bisque2
chromeyellow
darkspringyellow
$title = $color->title
Returns the title of the color, e.g.
aliceblue
bisque2
chrome yellow
Dark Spring-Yellow
$dictionary = $color->dictionary
Returns the Color::Library::Dictionary object that the color belongs to
$hex = $color->hex
Returns the hex value of the color, e.g.
ff08ff
eed5b7
eaa221
669900
Note that $hex does NOT include the leading #, for that use $color->html, $color->css, or $color->svg
$html = $color->html
$css = $color->css
$svg = $color->svg
Returns the hex value of the color with a leading #, suitable for use in HTML, CSS, or SVG documents, e.g.
#ff08ff
#eed5b7
#eaa221
#669900
$value = $color->value
Returns the numeric value of the color, e.g.
15792383
15652279
15376929
6723840
($r, $g, $b) = $color->rgb
Returns r, g, and b values of the color as a 3 element list (list context), e.g.
(240, 248, 255)
$rgb = $color->rgb
Returns r, g, and b values of the color in a 3 element array (scalar context), e.g.
[ 240, 248, 255 ]
$color = Color::Library::Color->new( id => $id, name => $name, title => $title, value => $value )
$color = Color::Library::Color->new( { id => $id, name => $name, title => $title, value => $value } )
$color = Color::Library::Color->new( [[ $id, $name, $title, $rgb, $hex, $value ]] )
Returns a new Color::Library::Color object representing the specified color
You probably don't want/need to call this yourself
FUNCTIONS
$hex = Color::Library::Color::rgb2hex( $rgb )
$hex = Color::Library::Color::rgb2hex( $r, $g, $b )
Converts an rgb value to its hex representation
$value = Color::Library::Color::rgb2value( $rgb )
$value = Color::Library::Color::rgb2value( $r, $g, $b )
Converts an rgb value to its numeric representation
$rgb = Color::Library::Color::value2rgb( $value )
($r, $g, $b) = Color::Library::Color::value2rgb( $value )
Converts a numeric color value to its rgb representation
($r, $g, $b) = Color::Library::Color::parse_rgb_color( $hex )
($r, $g, $b) = Color::Library::Color::parse_rgb_color( $value )
Makes a best effort to convert a hex or numeric color value to its rgb representation
perl v5.14.2 2011-12-07 Color::Library::Color(3pm)