10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to pass the getopts processed variable "${@}" to a function? It contains a list of package names needed in various functions.
Seems the issue I have is due to the order of the script, with the processed "${@}" falling after the unprossed "${@}".
I've been manually parsing options in the... (3 Replies)
Discussion started by: Cody Learner
3 Replies
2. Shell Programming and Scripting
Hi,
I have a function that is suposed to generate a AWR report:
#-----------------------#
gen_awr()
#-----------------------#
{
sqlplus -s admin/admin@OCEAN11<<ENDOFSQL
define num_days = ''
define report_type = "html"
define begin_snap =$snap1
define end_snap =%snap2
define... (1 Reply)
Discussion started by: amitlib
1 Replies
3. Shell Programming and Scripting
Guys,
May i know how can we de reference the code reference variable.?
my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";};
print $a->(4,5);
How can we print the whole function ?
Please suggest me regarding this.
Thanks for your time :)
Cheers,
Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies
4. Shell Programming and Scripting
I don't understand noglob.
I have a function:
function no_globb ()
{
set -o noglob
echo "$1"
set +o noglob
echo "$@"
}
When I run the function like this noglobb *.txt
The ouput is:
file01.txt
file01.txt file02.txt file03.txt
Shouldn't it be
*.txt
file01.txt file02.txt file03.txt (1 Reply)
Discussion started by: AlphaLexman
1 Replies
5. Shell Programming and Scripting
I have a shell script I want to run that will set environment variables based on the value of an input variable submitted when the shell script is called. For example:
$ mgenv.sh prod
This would set environment variables for prod
$ mgenv.sh test
This would set environment variables... (1 Reply)
Discussion started by: brtaylor73
1 Replies
6. UNIX for Dummies Questions & Answers
I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine.
I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this.
Here is my function:
<?php
function TRECSend($a, $b, $c, $d,... (0 Replies)
Discussion started by: EddiRae
0 Replies
7. Programming
Hi, i want to compile a code where fortran calls c . First I compiled C module ,it has pass by gcc. However, after generating .o file. I compiled C and fortran files together by intel fortran and it failed " undefined reference to 'vicerror'". vicerror is a function. I do not know why. (1 Reply)
Discussion started by: austinhsu
1 Replies
8. Shell Programming and Scripting
In a bash script, I'm looking for a way to set each matching line of a file into its own variable, or variable array.
As an example, i have a crontab file with several entries:
00 23 * * * /usr/local/bin/msqlupdate -all
00 11 * * * /usr/local/bin/msqlupdate -inc
00 03 * * *... (2 Replies)
Discussion started by: lochraven
2 Replies
9. UNIX for Advanced & Expert Users
Can any one let me know like how cn i set an label or number for each function whihc are there in an shells script:
for example
cd /opt/qcom/test/
function1()
function2()
function3()
-------
i ahe a script like this .now i want to count each of this function like 1, 2, 3,............... (3 Replies)
Discussion started by: lalitka
3 Replies
10. Shell Programming and Scripting
Under IRIX 6.5, the Bourne shell is named /bin/bsh. I need to redirect output into a file reading loop, and retain values set within the loop based on processing that goes on within the loop for later processing. This code
#!/bin/bsh
k=1
cat file | while read k ; do
echo "$k"
done... (2 Replies)
Discussion started by: criglerj
2 Replies