01-24-2011
Quote:
Originally Posted by
kaoboy97
Thanks, I don't know why this still isn't working though. Btw, I'm using bash.
For example, I have a file script.sh
echo PEOPLE: $PEOPLE
echo FRUITS: $FRUITS
and a config.configfile
PEOPLE=(
Vincar
Matthew
)
FRUITS=(
Banana
Apple
Orange
Pineapple
)
when I run ./script.sh config.configfile, the output is
PEOPLE:
FRUITS:
the contents do not show...=(
thanks.
I don't see that you're actually loading the config file, it doesn't just happen unless you tell it. You have to do
source config.configfile Which in your case might be
source "$1" though you might want to check that "$1" exists and is a file and all that before you source it.
---------- Post updated at 11:20 AM ---------- Previous update was at 11:18 AM ----------
Quote:
Originally Posted by
GERMANICO
...and your loading script could be as simple as ./init.cfg
I don't think that's correct. You must source the script, not just run it, for the variables to end up in your
current context and not a
new one.
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all.
I'm currently building my own webmail server but I will need to collect my mail from several different account scattered around the 'Net.
I know fetchmail can do this. The problem I have is that my main POP3 mailbox at my ISP lumps all users' e-mails into one box.
This means that... (0 Replies)
Discussion started by: DraconianTimes
0 Replies
2. Ubuntu
I have a Toshiba Satellite 1135 laptop, and i want to install a fedora core edition in my external USB hard drive.
I have
Intel celeron 1.8 ghz processor
256 mb ram.
Please suggest if there are other suitable linux OS which would be better than fedora core. (2 Replies)
Discussion started by: sunilryl
2 Replies
3. AIX
hi all
im making a script for backing up a specific filesystem that is an output of our DB13(SAP) into tape..which is around 40g +
which is suitable tar or backup command
i heard tar has limitations ..i heard it can only backup upto 2 gig??? is this ryt?
and ill put this into cron.
... (6 Replies)
Discussion started by: redmanshogun
6 Replies
4. Shell Programming and Scripting
Hi,
I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below.
I will be using the config file as mentioned below:
(config.txt)
country:a,b
city:1,2
type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies
5. Shell Programming and Scripting
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Discussion started by: muraliinfy04
4 Replies
6. AIX
Hi,
I am running a JDBC:ODBC code to access .mdb file in my windows system successfully but, not able to access MS Access mdb file in AIX Unix box. when I am trying to run the same piece of code in AIX Unix box it is saying "No Suitable Driver". I need some immediate help. (0 Replies)
Discussion started by: thirunp
0 Replies
7. Red Hat
Hi folks,
I am trying to configure Apache webserver and also a virtual host inside this webserver.
For Global server config: /var/www/html/index.html
For virtual host config: /var/www/virtual/index.html
Both client10 & www10 are pointing to 192.168.122.10 IP address.
BUT, MY... (1 Reply)
Discussion started by: freebird8z
1 Replies
8. Android
May I assume that there is no point to format your SD Card (assume you have the 32 GB size) to NTFS if the device can support SD Card of up to 32 GB and FAT32 maximum limit is also exactly 32 GB?
"Crest Accountants
Suite E316, Level 3 Oracle East Building 3 Oracle Boulevard Broadbeach QLD 4218,... (1 Reply)
Discussion started by: PheekaJabal
1 Replies
9. UNIX and Linux Applications
Hi,
It may sound silly or stupid, but I really have a problem choosing a theme for my emacs.
I am using Ubuntu (12.04) and I use emacs on the x-console (emacs -nw) I have added the "emacs-goodies" package and tried all the themes in it to no avail.
My eyes are not comfortable with all these... (0 Replies)
Discussion started by: faizlo
0 Replies
10. Shell Programming and Scripting
I want to create a config file that has parameters that can be specified using - or -- (without an equals sign), as well as the ability to output the file using - or --. Could somebody point me to a generic script to do this? Say for example, I wanted to run MainScript and have it set alpha to 2... (1 Reply)
Discussion started by: multiverse22
1 Replies
LEARN ABOUT DEBIAN
ncursesw5-config
ncursesw5-config(1) General Commands Manual ncursesw5-config(1)
NAME
ncursesw5-config - helper script for ncurses libraries
SYNOPSIS
ncursesw5-config [options]
DESCRIPTION
This is a shell script which simplifies configuring applications against a particular set of ncurses libraries.
OPTIONS
--prefix
echos the package-prefix of ncurses
--exec-prefix
echos the executable-prefix of ncurses
--cflags
echos the C compiler flags needed to compile with ncurses
--libs echos the libraries needed to link with ncurses
--version
echos the release+patchdate version of ncurses
--abi-version
echos the ABI version of ncurses
--mouse-version
echos the mouse-interface version of ncurses
--bindir
echos the directory containing ncurses programs
--datadir
echos the directory containing ncurses data
--includedir
echos the directory containing ncurses header files
--libdir
echos the directory containing ncurses libraries
--mandir
echos the directory containing ncurses manpages
--terminfo
echos the $TERMINFO terminfo database path, e.g.,
/etc/terminfo
--terminfo-dirs
echos the $TERMINFO_DIRS directory list, e.g.,
/etc/terminfo:/lib/terminfo:/usr/share/terminfo
--termpath
echos the $TERMPATH termcap list, if support for termcap is configured.
--help prints this message
SEE ALSO
curses(3X)
This describes ncurses version 5.9 (patch 20110404).
ncursesw5-config(1)