Sponsored Content
Top Forums UNIX for Dummies Questions & Answers printing a "\" in a file ... how ? Post 302355416 by OneDreamCloser on Tuesday 22nd of September 2009 04:30:46 PM
Old 09-22-2009
printing a "\" in a file ... how ?

hi all,

i would like to print a "\" character using echo to a file,
here is an example (an input to gnuplot) :

echo "\"$scheduler.dat\" using 1:2 with linespoints lt rgb \"blue\" title \"case $scheduler\", "\" >> load_VS_latency.plot

in other words, i would like to display for example this line :
"null.dat" using 1:2 with linespoints lt rgb "blue" title "case null", \
but what i get is :
"null.dat" using 1:2 with linespoints lt rgb "blue" title "case null", "

how can i fix this ?

thanx

---------- Post updated at 03:30 PM ---------- Previous update was at 02:47 PM ----------

oh sorry, i just put a "\\"
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

3. Shell Programming and Scripting

">" used in system() is not printing into file

I have a problem with the following skript in awk. cat runde.txt |awk '{ if ($5==2) { dataname_v=$1 "_" $4 "_adjust.rad befehl1="gensurf seitenwand... (17 Replies)
Discussion started by: ergy1983
17 Replies

4. Shell Programming and Scripting

To start printing a file at line " n" .

To start printing a file at line " n" . let n = 10 and FileName = f1 (3 Replies)
Discussion started by: shashwat2691
3 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Cat Command on File not printing "Blank" Lines?

Hello All, I have a bash script and in it at some point I call an Expect Script that does some stuff and saves its output in a ".txt" file. Example "/path/to/my/file/Expect_Output.txt" file: notice the 2nd line is empty in the file... Data for Host-1 (192.168.1.110) Checking the... (2 Replies)
Discussion started by: mrm5102
2 Replies

7. Shell Programming and Scripting

finding the strings beween 2 characters "/" & "/" in .txt file

Hi all. I have a .txt file that I need to sort it My file is like: 1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO) 2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies

8. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
IMAGECOLORCLOSEST(3)							 1						      IMAGECOLORCLOSEST(3)

imagecolorclosest - Get the index of the closest color to the specified color

SYNOPSIS
int imagecolorclosest (resource $image, int $red, int $green, int $blue) DESCRIPTION
Returns the index of the color in the palette of the image which is "closest" to the specified RGB value. The "distance" between the desired color and each color in the palette is calculated as if the RGB values represented points in three- dimensional space. If you created the image from a file, only colors used in the image are resolved. Colors present only in the palette are not resolved. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $red -Value of red component. o $green -Value of green component. o $blue -Value of blue component. The colors parameters are integers between 0 and 255 or hexadecimals between 0x00 and 0xFF. RETURN VALUES
Returns the index of the closest color, in the palette of the image, to the specified one EXAMPLES
Example #1 Search for a set of colors in an image <?php // Start with an image and convert it to a palette-based image $im = imagecreatefrompng('figures/imagecolorclosest.png'); imagetruecolortopalette($im, false, 255); // Search colors (RGB) $colors = array( array(254, 145, 154), array(153, 145, 188), array(153, 90, 145), array(255, 137, 92) ); // Loop through each search and find the closest color in the palette. // Return the search number, the search RGB and the converted RGB match foreach($colors as $id => $rgb) { $result = imagecolorclosest($im, $rgb[0], $rgb[1], $rgb[2]); $result = imagecolorsforindex($im, $result); $result = "({$result['red']}, {$result['green']}, {$result['blue']})"; echo "#$id: Search ($rgb[0], $rgb[1], $rgb[2]); Closest match: $result. "; } imagedestroy($im); ?> The above example will output something similar to: #0: Search (254, 145, 154); Closest match: (252, 150, 148). #1: Search (153, 145, 188); Closest match: (148, 150, 196). #2: Search (153, 90, 145); Closest match: (148, 90, 156). #3: Search (255, 137, 92); Closest match: (252, 150, 92). SEE ALSO
imagecolorexact(3), imagecolorclosestalpha(3), imagecolorclosesthwb(3). PHP Documentation Group IMAGECOLORCLOSEST(3)
All times are GMT -4. The time now is 04:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy