02-13-2007
The above only works depending on your ksh version.
What always should work is using the "shiift" command.
# cat ff.sh
#!/usr/bin/ksh
echo $1
echo $2
echo $3
echo $4
echo $5
echo $6
echo $7
echo $8
echo $9
shift 9
echo $1
echo $2
echo $3
echo $4
echo $5
echo $6
# ./ff.sh a b c d e f g h i j k l m n o p
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
I provided an extra argument ("p") on purpose.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Say I write something like the following:
var1=1
var2=2
for int in 1 2
do
echo "\$var$int"
done
I want the output to be:
1
2
Instead I get something like:
$var1
$var2 (2 Replies)
Discussion started by: Awanka
2 Replies
2. Shell Programming and Scripting
Dear Friends,
Please help me to achieve the following:
I want to pass one parameter from Shell-script to Sql-script.
Example:
My ShellScript.sh is calling report.sql like this:
/bin/sqlplus /reports.sql
And
My report.sql is calling many Stored-Procedures like this:
exec... (0 Replies)
Discussion started by: subodhbansal
0 Replies
3. UNIX for Advanced & Expert Users
Hi,
I am writing a wrapper script(wrap_script.sh) to one of the main scripts (main_script.sh)
The main script is executed as following:
./main_script.sh <LIST> <STARTDATE> <ENDDATE>
looks for a parameter which is a LIST(consists of different list names that need to be processed), START/END... (0 Replies)
Discussion started by: stunnerz_84
0 Replies
4. UNIX for Advanced & Expert Users
Hi,
I am unable to use parameter in sql script passed from unix script.
my sql script CREATE_SBI_LIST_GROUP.sql is like this -
-------------------------------
SELECT
SDS.ID "SO_ID",
SDS.SO a1,
sgp.sga__code SGA_CODE,
FROM
sga sga,sales_genl_provision sgp , comm_product_condn cpc... (2 Replies)
Discussion started by: apskaushik
2 Replies
5. Shell Programming and Scripting
Hi
I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/
Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies
6. Shell Programming and Scripting
i am passing input parameter 'one_two' to the script , the script output should display the result as below
one_1two
one_2two
one_3two
if
then
echo " Usage : <$0> <DATABASE> "
exit 0
else
for DB in 1 2 3
do
DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}`
done
fi (5 Replies)
Discussion started by: only4satish
5 Replies
7. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
Discussion started by: Ashunayak
0 Replies
8. UNIX for Dummies Questions & Answers
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies
9. Shell Programming and Scripting
Hi.
How do I achieve this
sh /EDWH-DMT02/script/MISC/exec_sql.sh "@/EDWH-DMT02/script/others/CSM_CKC/Complete_List.sql ${file_name}" Complete_List.txt
The /EDWH-DMT02/script/MISC/exec_sql.sh has two parameters and it's working fine with this
sh /EDWH-DMT02/script/MISC/exec_sql.sh... (7 Replies)
Discussion started by: aimy
7 Replies
10. Shell Programming and Scripting
I have written a script which will take input parameter as another script.
However, if the script passed as input parameter has parameters then this script doesn't work.
I have a script b.ksh which has 1 and 2 as parameters
I have a script c.ksh which has 3,4 and 5 as parameters
vi a.ksh... (1 Reply)
Discussion started by: Vee
1 Replies
LEARN ABOUT PHP
locale_get_display_name
LOCALE_GET_DISPLAY_NAME(3) 1 LOCALE_GET_DISPLAY_NAME(3)
Locale::getDisplayName - Returns an appropriately localized display name for the input locale
Object oriented style
SYNOPSIS
publicstatic string Locale::getDisplayName (string $locale, [string $in_locale])
DESCRIPTION
Procedural style
string locale_get_display_name (string $locale, [string $in_locale])
Returns an appropriately localized display name for the input locale. If is NULL then the default locale is used.
PARAMETERS
o $locale
- The locale to return a display name for.
o $in_locale
-optional format locale
RETURN VALUES
Display name of the locale in the format appropriate for $in_locale.
EXAMPLES
Example #1
locale_get_display_name(3) example
<?php
echo locale_get_display_name('sl-Latn-IT-nedis', 'en');
echo ";
";
echo locale_get_display_name('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo locale_get_display_name('sl-Latn-IT-nedis', 'de');
?>
Example #2
OO example
<?php
echo Locale::getDisplayName('sl-Latn-IT-nedis', 'en');
echo ";
";
echo Locale::getDisplayName('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo Locale::getDisplayName('sl-Latn-IT-nedis', 'de');
?>
The above example will output:
Slovenian (Latin, Italy, Natisone dialect);
slovxc3xa8ne (latin, Italie, dialecte de Natisone;
Slowenisch (Lateinisch, Italien, NEDIS)
SEE ALSO
locale_get_display_language(3), locale_get_display_script(3), locale_get_display_region(3), locale_get_display_variant(3).
PHP Documentation Group LOCALE_GET_DISPLAY_NAME(3)