10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have created one function for KSH and was running well with one parameter input since I just had to use $1 to get the parameter.
Now I want to do loop for each parameter(actually filenames) . I have try to use do loop, but $i does not resolve to parameter instead it resolves to 1,... (5 Replies)
Discussion started by: mysocks
5 Replies
2. Shell Programming and Scripting
Hi Gurus,
I have request which needs to pass position parameter to a function. I tried below simple code, it doesn't work.
#!/bin/bash
func_1(){
echo $1
}
func_1
$ ./set_file abc
$
do I need add some to get the position para first?
thanks in advance. (3 Replies)
Discussion started by: ken6503
3 Replies
3. UNIX for Dummies Questions & Answers
hi,
i have a function say "mask". i'm passing parameters to the function like file_name \$1 |.
inside the function i'm naming the second parameter as position (i.e value of position will be "$1").
i'm passing the position's value like " $position=a"
But it is nor picking the value "$1".... (5 Replies)
Discussion started by: amar1003
5 Replies
4. Solaris
Hi,
How to use a function with passing value as a parameter in unix ?
With Regards (7 Replies)
Discussion started by: milink
7 Replies
5. AIX
Hi,
I am getting the below error message When i am trying to delete the files from the directory.Could you please guide me?
rm *.aud
ksh: /usr/bin/rm: 0403-027 The parameter list is too long.
and
find /oracle/admin/testP/adump/*.aud -mtime +5 -exec rm {} \;
ksh: /usr/bin/find:... (3 Replies)
Discussion started by: nokiae63
3 Replies
6. Shell Programming and Scripting
am a beginer of shell Unix, plesase tell me how to get parameter with $perl in loop
$ perl -lne '$/="DOCEND";print $_."DOCEND" if /$ACC/' file_input > output
i can't get parameter in loop with perl fucntion like this
pass paramerter to $ACC not accept in this script
$ACC = paramerter to... (4 Replies)
Discussion started by: krai
4 Replies
7. Shell Programming and Scripting
HI all
I have a code like
##############################################
minyear()
{
curryear=$1
echo $curryear
}
##Main Program ##
minyear
exit
#######
when i execute "sh scriptname 2005" output should be like 2005 but the output is blank.
I guess i need to pass parameter to... (3 Replies)
Discussion started by: vasuarjula
3 Replies
8. Shell Programming and Scripting
Hi,
i have this code :
awk -v s=string_to_find 'BEGIN{
n=""
}
{
if ($0 ~ /FEATURE TESTED /)
{
n=$0
}
if (index($0,s)!=0)
{
if (n!="")
print n
n==""
}
}' $file1 > $file2 (4 Replies)
Discussion started by: kamel.seg
4 Replies
9. UNIX for Advanced & Expert Users
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?.
part of... (2 Replies)
Discussion started by: fastgoon
2 Replies
10. Shell Programming and Scripting
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?.
part of... (1 Reply)
Discussion started by: fastgoon
1 Replies