is there a command so that i can se info about the parallel port, if there isn't a specific command for that is there a command so i can se info about the system and all ports and devices?
Thanx
/Nick (2 Replies)
Hi,
is there a way to get information of an annex device connected to port A ? i need to get the I.P address of the annex and the port
it connected to on the annex.
dori (1 Reply)
Hi,
I am new to ksh scripting so your help will be much appreciated.
I have a file called file.txt which looks like this
Header 20050702 20050703
ABC
DEF
Header 20050703 20050704
123
456
Header 20050704 20050705
XXX
YYY
What I am trying to do is write out each of the record... (7 Replies)
Dear Sir,
i m going to use NP5610-16 moxa device for multiport serial communication.
i m using fedora-core 6 o.s.
after installation it will detect serial ports as /dev/ttyr0,/dev/ttyr1...ttyr32.
there are total 32 com ports.
now i want to write application which monitor all serial ports and... (6 Replies)
below is an extract from my file and I am trying to use Awk and grep and a while loop to pull infomation from under neath "HBA WWN=".HBA WWN=" reoccurs all over the file but the 100000c.....number are unique and I want to be able to pull and reference specifi information under this header ever time... (2 Replies)
NEWBIE ALERT!
Hi,
I'm 1 month into learning Perl and done reading "Minimal Perl" by Tim Maher (which I enjoyed enoumously). I'm not a programmer by profession but want to use Perl to automate various tasks at my job. I have a problem (obviously) and are looking for your much appreciated help.... (0 Replies)
Hi All,
Following is the program that i have written in cygwin. The redirection of the unfound $param1 to error.txt file doesnt work.Can any one help?
#!/usr/bin/sh
fname=$1
sed 's/ //g' "$fname" > fname1
while read i
do
echo $i > file1
#param1 is script name
... (1 Reply)
I have a record.txt it will update weekly, and it could be 2 lines or more ...
it just echo each line to the script
san jose,23.34%
tampa,2.15%
dallas,30.20%
seattle,44.29%
Unknown,16.72%
How do i write a shell script to give me a test.pl or bash file which contain
#!/home/perl... (8 Replies)
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger.
if ]
then
echo "Only satisfied variable with value"
... (3 Replies)
Discussion started by: prince1987
3 Replies
LEARN ABOUT PHP
in_array
IN_ARRAY(3) 1 IN_ARRAY(3)in_array - Checks if a value exists in an arraySYNOPSIS
bool in_array FALSE (mixed $needle, array $haystack, [bool $strict])
DESCRIPTION
Searches $haystack for $needle using loose comparison unless $strict is set.
PARAMETERS
o $needle
- The searched value.
Note
If $needle is a string, the comparison is done in a case-sensitive manner.
o $haystack
- The array.
o $strict
- If the third parameter $strict is set to TRUE then the in_array(3) function will also check the types of the $needle in the
$haystack.
RETURN VALUES
Returns TRUE if $needle is found in the array, FALSE otherwise.
EXAMPLES
Example #1
in_array(3) example
<?php
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo "Got Irix";
}
if (in_array("mac", $os)) {
echo "Got mac";
}
?>
The second condition fails because in_array(3) is case-sensitive, so the program above will display:
Got Irix
Example #2
in_array(3) with strict example
<?php
$a = array('1.10', 12.4, 1.13);
if (in_array('12.4', $a, true)) {
echo "'12.4' found with strict check
";
}
if (in_array(1.13, $a, true)) {
echo "1.13 found with strict check
";
}
?>
The above example will output:
1.13 found with strict check
Example #3
in_array(3) with an array as needle
<?php
$a = array(array('p', 'h'), array('p', 'r'), 'o');
if (in_array(array('p', 'h'), $a)) {
echo "'ph' was found
";
}
if (in_array(array('f', 'i'), $a)) {
echo "'fi' was found
";
}
if (in_array('o', $a)) {
echo "'o' was found
";
}
?>
The above example will output:
'o' was found
SEE ALSO array_search(3), isset(3), array_key_exists(3).
PHP Documentation Group IN_ARRAY(3)