10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that uses 2 arguments. I want to call the function part within this script using these same arguments. Below is what I came up with below script so far, any guidance would be helpful. Thank you!
cat backup.sh
#!/bin/bash
function usage {
echo "USAGE: $(basename $0)... (6 Replies)
Discussion started by: mbak
6 Replies
2. Shell Programming and Scripting
Dear All,
I want to know how can i call oracle function from shell script code . My oracle function have around 5 input parameters and one return value.
for name in *.csv;
do
echo "connecting to DB and start processing '$name' file at "
echo "csv file name=$x"
sqlplus -s scoot/tiger <!... (2 Replies)
Discussion started by: Balraj
2 Replies
3. Shell Programming and Scripting
I need to call a function within a code with $database and $ service as the arguments How do I proceed ? and how would a function be defined and these two arguments would be used inside the function?
calc_pref_avail $database $service
Best regards,
Vishal (7 Replies)
Discussion started by: Vishal_dba
7 Replies
4. Shell Programming and Scripting
Hi Guy's.
Hopefully someone can help me with what I am trying to archieve.
So situation currently is, I have a script already setup however I have another script that sits infront of it.
The main script basically goes and searchs multiple platforms for a list of entered data.
In... (10 Replies)
Discussion started by: mutley2202
10 Replies
5. Shell Programming and Scripting
HI,
MY question is a very simple one:
if i want to call an awk script with the input file name and also pass a variable value , then how to do it.
#>awk -f my_script.awk -v variable=value my_inputfile.txt
I can't do it like this.
throws error:
awk: my_script.awk:18:... (0 Replies)
Discussion started by: Onkar Banerjee
0 Replies
6. Shell Programming and Scripting
This command successfully gives me the clearcase views I want in stdout, one line per view name. Each view name appears to have no spaces.
cleartool lsview | grep -i `uname -n` | grep -v "ViewStorage\\|vgr_tools_sv" | cut -f 3 -d ' '
How can write a cygwin bash "for" loop that will iterate... (4 Replies)
Discussion started by: siegfried
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'm trying to understand the arguments from this system call, can someone help me figure it out?
write(1, "/home/nick/11sp/fred\n", 27/home/nick/11sp/fred) = 27
for argument 1, i know it is a file descriptor which specifies standard output. Argument 2, i believe is "what is to be... (4 Replies)
Discussion started by: l flipboi l
4 Replies
8. Shell Programming and Scripting
Let's say I want to print the arguments $4 till $#, how can I do this?
$# contains the number of arguments
$@ contain all the arguments as string
What i need is something like
for i in $4_till_$#; do
#do something with $i
convert $i ~/$output
done
The first 3 arguments are used as options... (6 Replies)
Discussion started by: hakermania
6 Replies
9. Shell Programming and Scripting
#!/bin/sh
APP_ROOT_MODE1=/opt/app1.0
APP_ROOT_MODE2=/opt/app2.0
APP_ROOT=${APP_ROOT_${APP_MODE}}
# enviornment variable APP_MODE will be exported in the terminal where
# we run the applciation, its value is string - MODE1 or MODE2
# My intension is:
# when export APP_MODE=MODE1... (4 Replies)
Discussion started by: princelinux
4 Replies
10. Programming
Hi friends
my C code is
int main()
{
system("cp <source> <destination>");
}
my question is
how to set variables for <source> and <destination>
how can we pass it to system() call.
can you suggest me
thankyou
kingskar (6 Replies)
Discussion started by: kingskar
6 Replies