Array Difference Sun Vs Linux


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Array Difference Sun Vs Linux
# 1  
Old 05-26-2009
Array Difference Sun Vs Linux

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
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get difference of two array?

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)
Discussion started by: lokendrasb
7 Replies

2. Shell Programming and Scripting

Finding difference in between two array's of strings

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)
Discussion started by: Y.balakrishna
3 Replies

3. Solaris

Pls. help with Sun Array 6120

Hi, I am on Sun Edge 6120 Disk array. When I do port listmap. The failover status below means I have to take action. I never used Sun Array before. Please advice. port targetid addr_type lun volume owner access u1p1 1 hard 0 v0 ... (0 Replies)
Discussion started by: samnyc
0 Replies

4. UNIX for Dummies Questions & Answers

Date difference in Sun OS 5.10

Hi, I need to find the difference between 2 dates in SunOS 5.10 input will be in(yyyymmdd) date1: 20131011 date2:20131012 my output shold be diff between two dates i.e 0,1,2,3 date2 is always greater than date1. if it handles even leap year then it wil be more helpful. thank u... (2 Replies)
Discussion started by: mohanalakshmi
2 Replies

5. Shell Programming and Scripting

Time difference command in Sun sorlaris

Hi , I want to find out the time difference. If the system date and time is "Jul 18 05:39:00" EST then it should return "Jul 18 04:39:00". i.e one hour differnce in time. Pls help me out. Other eg's : Jul 18 00:00:00 -> Jul 18 23:00:00 Jul 18 01:00:00 -> Jul 17 00:00:00 (3 Replies)
Discussion started by: arukuku
3 Replies

6. Shell Programming and Scripting

check the difference between 2 array

Hello Thanks everyone for the help earlier, what I would like to learn now is how can I achieve the following : array1 = (1234567,7665456,998889,000909) array2 = (1234567,5581445,998889,000909) Result 5581445 doesn't exist on array1 Thank you (6 Replies)
Discussion started by: amlife
6 Replies

7. Solaris

Difference between Sun Cluster 3.1 and 3.2

Hi All, Can you please help to understand the major differences between Sun cluster 3.1 and 3.2. Thanks, Deepak (1 Reply)
Discussion started by: naw_deepak
1 Replies

8. UNIX for Dummies Questions & Answers

Difference between sun solaris and linux?

Hi All, Iam curious to know wat are the differences between a sun machine and a linux machine?( In terms of architecture,applications etc) Thanks in advance (3 Replies)
Discussion started by: raz
3 Replies
Login or Register to Ask a Question
ARRAY_REVERSE(3)							 1							  ARRAY_REVERSE(3)

array_reverse - Return an array with elements in reverse order

SYNOPSIS
array array_reverse (array $array, [bool $preserve_keys = false]) DESCRIPTION
Takes an input $array and returns a new array with the order of the elements reversed. PARAMETERS
o $array - The input array. o $preserve_keys - If set to TRUE numeric keys are preserved. Non-numeric keys are not affected by this setting and will always be preserved. RETURN VALUES
Returns the reversed array. EXAMPLES
Example #1 array_reverse(3) example <?php $input = array("php", 4.0, array("green", "red")); $reversed = array_reverse($input); $preserved = array_reverse($input, true); print_r($input); print_r($reversed); print_r($preserved); ?> The above example will output: Array ( [0] => php [1] => 4 [2] => Array ( [0] => green [1] => red ) ) Array ( [0] => Array ( [0] => green [1] => red ) [1] => 4 [2] => php ) Array ( [2] => Array ( [0] => green [1] => red ) [1] => 4 [0] => php ) SEE ALSO
array_flip(3). PHP Documentation Group ARRAY_REVERSE(3)