Sponsored Content
Top Forums Shell Programming and Scripting functions and variables in bash Post 302699451 by Corona688 on Tuesday 11th of September 2012 05:33:16 PM
Old 09-11-2012
Don't call that function, then.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Variables and functions

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

2. Shell Programming and Scripting

awk - arithemetic functions with external variables

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

3. Programming

Trouble with Date Variables and Functions in PL/SQL

Hi, In the course of my script i have to compare SYSDATE with the 15th of the current month: if it is greater than i should set a variable date to 15th of the next month if less than i should set it to the 15th of the current month. In other words the question is how to set a date variable... (2 Replies)
Discussion started by: fmina
2 Replies

4. Shell Programming and Scripting

[bash] reassigning referenced variables in functions

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

5. Shell Programming and Scripting

Mathematical functions in bash shell

Hi, How can i do the mathematical calculations in bash shell? Are the mathematical functions available in bash shell? Ex: pow ceil floor sqrt (5 Replies)
Discussion started by: cola
5 Replies

6. Shell Programming and Scripting

bash functions arguments

This script is called fuu; #!/bin/bash speak() { case $1 in 1)echo one ;; 2)echo two ;; 3)echo three ;; esac } speak exit 0 when i run fuu 2 i expect "two" like... (2 Replies)
Discussion started by: Tártaro
2 Replies

7. Shell Programming and Scripting

variables and functions

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

8. Shell Programming and Scripting

Calling Bash Functions in the BG

I'm trying to call some functions in the background so that I can multitask in this script. Not working so hot. The functions I call don't ever seem to get called. I'm doing it the exact same way in another script and it's working like a champ so I'm very confused. Here's a pretty simple repro: ... (7 Replies)
Discussion started by: stonkers
7 Replies

9. Shell Programming and Scripting

ksh While Loop - passing variables to functions

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

10. Shell Programming and Scripting

Bash functions sequence ?

OK, I know function has to be defined first - in sequence - before it can be used. So the script has to be build "bottoms -up style, if you pardon my expression. I am running into a problem reusing function and breaking the sequence. It would be nice to be able to see the function... (10 Replies)
Discussion started by: annacreek
10 Replies
TDB_OPEN(3)                                                  Linux Programmer's Manual                                                 TDB_OPEN(3)

NAME
tdb_open - Open a tdb database. SYNOPSIS
#include <tdb.h> TDB_CONTEXT *tdb_open(const char *pathname, int hash_size, int tdb_flags, int open_flags, mode_t mode ); DESCRIPTION
Open the database, creating it if necessary. The hash size is advisory, use zero for a default value. tdb_flags can be one of TDB_CLEAR_IF_FIRST Clear database if we are the only one with it open. TDB_INTERNAL Don't use a file, instead store the data in memory. The pathname , open_flags , and mode are ignored in this case. This is useful if you need a quick associative array or map. TDB_NOLOCK Don't do any locking (this is always turned on for read-only file descriptors) TDB_NOMMAP Don't use mmap. TDB_CONVERT Create a database in the reverse of native endian: normally when the database is created (or cleared with TDB_CLEAR_IF_FIRST), it is created in native endian order. This flag is set (or unset) automatically for existing databases. The open_flags and mode are passed straight to the open call on the database file. A flags value of O_WRONLY is invalid. RETURN VALUE
On success a pointer to an opaque data structure, a TDB_CONTEXT is returned. On error a NULL is returned. AUTHORS
Software: Andrew Tridgell <tridge@linuxcare.com> and Luke Kenneth Casson Leighton Man page: Ben Woodard <ben@valinux.com> SEE ALSO
open(2), gdbm(3), tdb(3) Samba Aug 16, 2000 TDB_OPEN(3)
All times are GMT -4. The time now is 01:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy