hello,
do anybody know a program to format a shell script code ?
i tried "editrocket.com" but this product doesn't format a shell script code.
i searched for programs but can't find a shell script code formatter.
i have to change a shell script and the style of code is .....
regards (5 Replies)
Hi,
Anybody know on how to insert C code in shell script. I am writing BLOB data to a database table in C but I don't know on how to insert the C code in shell script. Thanks in advance. (1 Reply)
Hi i am new to shell script can any one please explain me the code below which is written for execution of python scripts which are located in same folder.
please explain the code line by line
ls *.py > xx
while
do
read myline || break
python $myline
done<xx
Thanks
Mukthyar.... (1 Reply)
Hello,
Please i want to insert this code in a java program because i need to call a java function inside the while:
Please how can i do?
thank you so much (9 Replies)
Hello,
I try to run a script shell from a java program:
but it runs only if i do :chmod 777 myShellScript in the terminal
Please how can i insert chmod 777 in my java code without going through the terminal?
Thank you (1 Reply)
hi,
i want to pop up an alert box using perl script. my requirement is.
i am using a html page which calls a perl script. this perl script calls a shell script.. after the shell script ends its execution, i am using exit 0 to terminate the shell script successfully and exit 1 to terminate the... (3 Replies)
Hello,
I am trying to colour code a single word in whole line. Can you please help.
I am able to colour code the whole line but not able to do only for single word
Query) I want to echo below line and colur code red to word FAILED only.
This server is FAILED in check. (2 Replies)
I have a script:
DAYS=10
print_usage() {
echo "\n"
echo "Usage: $PROG dir1 "
echo " This program will delete all file/directories that are beyond "
echo " 'x days' old."
echo " -days - This flag allows you to define x... (3 Replies)
Discussion started by: digioleg54
3 Replies
LEARN ABOUT PHP
collator_asort
COLLATOR_ASORT(3) 1 COLLATOR_ASORT(3)Collator::asort - Sort array maintaining index association
Object oriented style
SYNOPSIS
public bool Collator::asort (array &$arr, [int $sort_flag])
DESCRIPTION
Procedural style
bool collator_asort (Collator $coll, array &$arr, [int $sort_flag])
This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is
used mainly when sorting associative arrays where the actual element order is significant. Array elements will have sort order according to
current locale rules.
Equivalent to standard PHP asort(3).
PARAMETERS
o $coll
-Collator object.
o $arr
-Array of strings to sort.
o $sort_flag
- Optional sorting type, one of the following:
o Collator::SORT_REGULAR - compare items normally (don't change types)
o Collator::SORT_NUMERIC - compare items numerically
o Collator::SORT_STRING - compare items as strings
Default $sort_flag value is Collator::SORT_REGULAR. It is also used if an invalid $sort_flag value has been specified.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
collator_asort(3)example
<?php
$coll = collator_create( 'en_US' );
$arr = array(
'a' => '100',
'b' => '50',
'c' => '7'
);
collator_asort( $coll, $arr, Collator::SORT_NUMERIC );
var_export( $arr );
collator_asort( $coll, $arr, Collator::SORT_STRING );
var_export( $arr );
?>
The above example will output:
array (
'c' => '7',
'b' => '50',
'a' => '100',
)array (
'a' => '100',
'b' => '50',
'c' => '7',
)
SEE ALSO
Collator constants, collator_sort(3), collator_sort_with_sort_keys(3).
PHP Documentation Group COLLATOR_ASORT(3)