Here's is an example of what I want to do:
var1="Horse "
var2="Cat "
var3="Fish "
for animals in "$var1" "$var2" "$var3"
do
set $animals
pet=$1
## Ok, now I want to get the values of $pet, but
## I want to retain the full length it was... (3 Replies)
Bourne shell
Solaris
I'm trying to set a flag to perform an action only when data is found. So I initialize the flag with:
X=0
Then I read the data:
if ; then
while read a b c
do
X=1
done < ${inputFile}
fi
The problem is that X will be set to 1 inside the while loop but when... (5 Replies)
Hi,
I am trying to sum up numbered columns and in order to tidy up the program I have wrote a function to do the adding of some numbers. I have a problem though with passing a variable to the function in the UNIX bash shell. The function only gives the first number in the variable list and does... (4 Replies)
I would like to know how to pass a variable inside a variable to a function.
sample code below
--------------
for x in 1 9
do
check_null $C$x ##call function to check if the value is null
if
then
echo "line number:$var_cnt,... (2 Replies)
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Hey folks,
I'm pretty new to unix programming. I was trying to get something to work but it's not doing what I expected.
#!/bin/ksh
. ./functions.sh
STRING=function_1
FUNCTION="$STRING"
RETURN=eval $FUNCTION
echo "value of $FUNCTION function is: $RETURN"
All i'm... (5 Replies)
Hello again :)
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
... (2 Replies)
Hi,
I use Korn Shell. Searched Forum and modified the way the file is input to the while loop, but still the variable does not seem to be retaining the final count.
while read name
do
Tmp=`echo $name | awk '{print $9 }'`
Count=`cat $Tmp | wc -l`... (6 Replies)
Hello All,
I would like to ask help from you on how to pass variable value from a function that has been called inside the function. I have created below and
put the variables in " ". Is there another way I can do this? Thank you in advance.
readtasklist() {
while read -r mod ver... (1 Reply)
updateEnvironmentField() {
linewithoutquotes=`echo $LINE | tr -d '"'`
b()
}
I want to pass variable named $linewithoutquotes to another method called b(), which is called from updateEnvironmentField() method. How to do the above requirement with shell script (1 Reply)
Discussion started by: pottic
1 Replies
LEARN ABOUT DEBIAN
ledgersmb::dbobject::eoy
LedgerSMB::DBObject::EOY(3pm) User Contributed Perl Documentation LedgerSMB::DBObject::EOY(3pm)NAME
LedgerSMB::DBObject::EOY - End of Year handling module
SYNOPSYS
This class contains methods for end of year entry.
BASIC PROPERTIES
end_date specifies the end date for a closed period.
reference specifies the gl reference field associated with the account closure
description specifies the gl description field associated with the account closure
retention_acc_id specifies the account id used as a retaining account.
METHODS
$eoy->checkpoint_only();
This creates account checkpoints at $eoy->{end_date}. This has two uses: 1) Can be used to "close" books without zeroing
income/expense accounts. This prevents data from being inserted for earlier dates.
2) This can be used to improve performance by creating a "lookback" point.
$eoy->reopen_books()
This reverses any end of year transaction on $eoy->{end_date}, and deletes checkpoints for that day.
$eoy->close_books()
Requires all properies in BASIC PROPERTIES to be set. This creates a gl yearend transaction, and moves income/expenses to the selected
equity account for retained earnings.
$eoy->list_earnings_accounts
Returns a list of equity accounts, and sets $eoy->{earnings_accounts} to a list of hashrefs. These are used to select retained
earnings accounts in closing books.
COPYRYIGHT
Copyright (C) 2009 The LedgerSMB Core Team. This may be re-used as permitted by the GNU General Public License v 2 or at your option any
later version. Please see included License.txt for details.
perl v5.14.2 2012-03-25 LedgerSMB::DBObject::EOY(3pm)