Sponsored Content
Top Forums Shell Programming and Scripting Test command non case specific string comparision Post 302881656 by wisecracker on Monday 30th of December 2013 06:08:45 PM
Old 12-30-2013
Hi Don...

No problem but I hate to say this but there might be more:-

Same lines, but missing " [" just after "||" on two of them...

I missed that first time round...
This User Gave Thanks to wisecracker For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

lower case to upper case string conversion in shell script

How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies

2. Shell Programming and Scripting

case insenserive comparision

in If statement how can i campare "ASCII" with "ascii" the result of comparision shold be true..... (2 Replies)
Discussion started by: mahabunta
2 Replies

3. Shell Programming and Scripting

awk command to test if a string is a file

What awk command will test a string to determine if it is a valid file name? With the following awk statement I isolate the lines from the inputfile that might contain a filename, then I attempt to test the possible filename which is always in $4 from each line. However it is not working at all... (4 Replies)
Discussion started by: Arsenalman
4 Replies

4. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

5. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

6. Shell Programming and Scripting

String comparision

I have a string like ab or abc of whatever length. But i want to know whether another string ( for example, abcfghijkl, OR a<space> bcfghijkl ab<space> cfghijkl OR a<space>bcfghijkl OR ab<space> c<space> fghijkl ) starts with ab or abc... space might existing on the longer string... If so, i... (1 Reply)
Discussion started by: nram_krishna@ya
1 Replies

7. Shell Programming and Scripting

String Comparision

I want to compare two strings using awk dynamically without trimming the spaces and want to find the count of matching string. Input Strings file: File1 content (file1): " a " " a2 " File2 content (file2): " a " " a " " a2 " " b2 " " c2 "... (3 Replies)
Discussion started by: AhmedLakadkutta
3 Replies

8. Shell Programming and Scripting

Prefixing test case methods with letter 'test'

Hi, I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
Discussion started by: royalibrahim
5 Replies

9. Shell Programming and Scripting

Unable to update the string in a file trough case command

Hi All, my requirement is first search the line and updated stg value with the user input value. ws.rsp.url=https://rt930.rsp-stg.cb.info53.com/RSP/RAFT^M stg is not fixed string it may varies.So i used the below command for it rsp=`cat properties | grep ^ws.rsp.url= | awk -F"/"... (1 Reply)
Discussion started by: bhas85
1 Replies

10. Shell Programming and Scripting

How to test that a string doesn't contain specific characters?

Hi ! :) I made this : #!/bin/bash rsa_dir="/etc/openvpn/easy-rsa/" rsa_key_dir="/etc/openvpn/easy-rsa/keys/" ccd_dir="/etc/openvpn/ccd/" regex_special_char='' cd $rsa_dir while read -p "Please can you enter the vpn's username : " username ] || ] || ] || ] do echo "Your entry... (10 Replies)
Discussion started by: Arnaudh78
10 Replies
IMAGELINE(3)								 1							      IMAGELINE(3)

imageline - Draw a line

SYNOPSIS
bool imageline (resource $image, int $x1, int $y1, int $x2, int $y2, int $color) DESCRIPTION
Draws a line between the two given points. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $x1 - x-coordinate for first point. o $y1 - y-coordinate for first point. o $x2 - x-coordinate for second point. o $y2 - y-coordinate for second point. o $color - The line color. A color identifier created with imagecolorallocate(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Drawing a thick line <?php function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1) { /* this way it works well only for orthogonal lines imagesetthickness($image, $thick); return imageline($image, $x1, $y1, $x2, $y2, $color); */ if ($thick == 1) { return imageline($image, $x1, $y1, $x2, $y2, $color); } $t = $thick / 2 - 0.5; if ($x1 == $x2 || $y1 == $y2) { return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color); } $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q $a = $t / sqrt(1 + pow($k, 2)); $points = array( round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a), round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a), round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a), round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a), ); imagefilledpolygon($image, $points, 4, $color); return imagepolygon($image, $points, 4, $color); } ?> SEE ALSO
imagecreatetruecolor(3), imagecolorallocate(3). PHP Documentation Group IMAGELINE(3)
All times are GMT -4. The time now is 12:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy