Hi All,
I have a script in which an array is defined. when i run that on Linux box its fine but when i run on SunOS its points to the line where array is defined as below :
syntax error at line 9 : `(' unexpected
array defined as
ID=( ~Hog ~Todd ~Mike )
Thanks in advance (0 Replies)
Greetings,
DISCLAIMER: My shell scripting is rusty so my question may be borderline stupid. You've been warned.
I need to create a script that a) lists the content of zip files in a directory and b) sends out an `exception` report. My ZIP files contain a control file (for load check). I want... (2 Replies)
Hello! I'm just learning the shell, and I would really like to know how to do this:
Given these 2 commands:
ls -l
ls -le
How can I, with a one-liner, ask the shell to show me visually in the shell, what the difference is between the output of the two commands? They look the same to me... (6 Replies)
Dear all, I'm stuck on Solaris 9 bash (I believe is quite different from Linux system) trying to find a solution.
I have one file named like:120629-1750-TERZ81_AS_YTR.txt
YYMMDD-HH-MM-......The script should compare the actual date with the one reported on the file name and then take an action... (4 Replies)
i stored some values in array , then i traverse through the array and check for
some values and if they exist then echo success.
let us consider that in our array we stored values from an sql query
like this
#!/bin/bash
declare -a arr
arr=$( sqlplus -s rte/rted2@rel76d2 << EOF
set... (1 Reply)
I am currently setting up a public key authentication between servers. The goal is to get the date via `ssh hostname date` on all the 4 remote servers , put the value in a text file on the central server and compare the date (specifically seconds) for each server date output to check if time is... (7 Replies)
I was looking at this script which outputs the two lines which differs less than one sec.
#!/usr/bin/perl -w
use strict;
use warnings;
use Time::Local;
use constant SEC_MILIC => 1000;
my $file='infile';
## Open for reading argument file.
open my $fh, "<", $file or die "Cannot... (1 Reply)
Hi,
Can anybody help me in finding the difference between two array elements with the help of code pls.
purge=("Purge Concurrent Request and/or Manager Data" "Purge Signon Audit data" "Purge Obsolete Workflow Runtime Data" "Purge Logs and Closed System Alerts")
purge_1=("Purge Obsolete... (3 Replies)
Required Unix shell script which will identify the difference of String2 based on string1. I am facing this issue and unable to achieve the result.
String1= {1 3 lok kam}
String2= {3 kam 5}
Result should be like below:
Data is matching for: 3
Data is matching for: kam
Data is not matching... (7 Replies)
Hi everyone, :)
I'm trying to make a simple C program that scans an array of chars to see if its elements are similar.
I can't understand what's wrong. Could you help me to fix this? Here is the code.
Thanks!
#include<stdio.h>
int main() {
int arr;
int i, len;
int flag =... (10 Replies)
Discussion started by: IgorGest
10 Replies
LEARN ABOUT PHP
array_uintersect_uassoc
ARRAY_UINTERSECT_UASSOC(3) 1 ARRAY_UINTERSECT_UASSOC(3)array_uintersect_uassoc - Computes the intersection of arrays with additional index check, compares data and indexes by separate callback func-tionsSYNOPSIS
array array_uintersect_uassoc (array $array1, array $array2, [array $...], callable $value_compare_func, callable $key_compare_func)
DESCRIPTION
Computes the intersection of arrays with additional index check, compares data and indexes by separate callback functions.
PARAMETERS
o $array1
- The first array.
o $array2
- The second array.
o $value_compare_func
- The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to
be respectively less than, equal to, or greater than the second.
int callback (mixed $a, mixed $b)
o $key_compare_func
- Key comparison callback function.
RETURN VALUES
Returns an array containing all the values of $array1 that are present in all the arguments.
EXAMPLES
Example #1
array_uintersect_uassoc(3) example
<?php
$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
$array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red");
print_r(array_uintersect_uassoc($array1, $array2, "strcasecmp", "strcasecmp"));
?>
The above example will output:
Array
(
[a] => green
[b] => brown
)
SEE ALSO array_uintersect(3), array_intersect_assoc(3), array_intersect_uassoc(3), array_uintersect_assoc(3).
PHP Documentation Group ARRAY_UINTERSECT_UASSOC(3)