10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm reading a text file using a while loop but when I call a function from within this loop it exits that same iteration … even though there are many more lines in the file to be read.
I thought it was something to do with the IFS setting but it appears that a function call (when run... (3 Replies)
Discussion started by: user052009
3 Replies
2. Shell Programming and Scripting
I have a bash script with some functions as below and am wondering if I can use the variables declared in setup in the other functions and in the rest of the bash script.
setup(){
none=0; low=1; medium=2; high=3; debug=4
var1="red"
var2="fred"
}
create_basemap() {
... (7 Replies)
Discussion started by: kristinu
7 Replies
3. Shell Programming and Scripting
can somebody telll me what my values are not being displayed in the function func1()
{oracle@im4s012nz1_DUMMY}$ cat x1.ksh
#!/bin/ksh
getpwd()
(
set -x
. /home/oracle/dba/bin/CyberArk/CyberArk_GetPass.ksh
ORA_USER=$DB_UID
ORA_PWD=$DB_PWD
echo "Here I am 1... (6 Replies)
Discussion started by: BeefStu
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I made an executable file in terminal and it looks like this.
echo Enter the name of the file without the .wig extension
read NAME
echo Enter the ratio
read RATIO
awk '{$2*=$RATIO;{print $0}}' ${NAME}.wig > ${NAME}normalized.wig
I have a file with several million lines that look... (6 Replies)
Discussion started by: wyarosh
6 Replies
5. Programming
Hi guys.
I have some questions about SQL functions in postgresql:
1. Can a SQL function call another SQL function?
2. How about recursive calls?
3. Consider we have function that has a varchar argument.
CREATE FUNCTION func(varchar) RETURN void AS $$
some SQL queries.
... (0 Replies)
Discussion started by: majid.merkava
0 Replies
6. Shell Programming and Scripting
How do I dynamically assign the below output to unix shell variables
so I can build a menu in a shell script?
Example:
var1 = 1 var2= SYSTEM
var3 = 2 var4= UNDOTBS1
and so on, then in the shell script I can use the variables to build a menu.
set serveroutput on
declare... (2 Replies)
Discussion started by: djehres
2 Replies
7. Shell Programming and Scripting
Hello all,
Problem.
----------
I'm trying to reassign a referenced variable passed to a 'local'
variable in a function but the local variable refuses to be assigned
the content of the referenced variable.
Any ideas would be appreciated.
Objective.
-----------
Eliminate all $VAR... (1 Reply)
Discussion started by: ASGR
1 Replies
8. Shell Programming and Scripting
hi
this is an example of code:
use strict;
use warnings;
open FILE, "/tmp/result_2";
my $regex="\\ Starting program ver. (.*)";
my $res="Program started, version <$1> - OK.\n";
while (<FILE>) {
if ($_ =~ /($regex)/) {
print "$res";
}
}
close FILE;
This finds $regex and print... (3 Replies)
Discussion started by: xist
3 Replies
9. Shell Programming and Scripting
I'm trying to get awk to do arithmetic functions with external variables and I'm getting an error that I cannot figure out how to fix.
Insight would be appreciated
money=$1
rate1=$(awk -F"\t " '/'$converting'/{print $3}' convert.table)
rate2=$(awk -F"\t"... (2 Replies)
Discussion started by: DKNUCKLES
2 Replies
10. Shell Programming and Scripting
I have a script that ultimately will FTP data to certain directories based on a character in the filename. I am creating a function within my script to handle the FTP call. Are the variables that are setup in the original script accessible to the function? If not, is there a way to allow them to... (4 Replies)
Discussion started by: dfb500
4 Replies