help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling function from various files


From: michael-franzese
Subject: Calling function from various files
Date: Tue, 13 Apr 2021 04:42:45 +0200

Am trying to ran some tests on some bash code.

Here is how I run my test

cd fractr-test
./colr-test.sh

and this is what I get

termi-colr-wheel: * 79
colr-test: ***
Here is colr-fractr.sh
colr-test: ***
scout-terminfo-colours: **

For some reoson I do still do not understand, I do not get the number 79
next to the double and triple stars.

Here is the code

./colr-tools.sh
termi-colr-wheel ()
  { declare -rA tis=([cols]="$(tput cols)")
    echo "* ${tis[cols]} }

./fractr-test/colr-fractr.sh
scout-terminfo-colours {echo "** ${tis[cols]}"}

./fractr-test/colr-test.sh
tools_path=$(readlink -f "$0")
tools_path="${tools_path%/*}"
tools_path="${tools_path%/*}"

source ${tools_path}/colr-tools.sh

termi-colr-wheel
echo "colr-test: *** ${tis[cols]}"

source ./colr-fractr.sh
echo "colr-test: *** ${tis[cols]}"
scout-terminfo-colours








reply via email to

[Prev in Thread] Current Thread [Next in Thread]