10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I just want to make sure I am understanding how to pass a config file to a bash script . In the below I pass to arguments to a script, then define them in the script as id and config. I then source config using ., if I understand correctly the variables in the config file can now be used by the... (11 Replies)
Discussion started by: cmccabe
11 Replies
2. UNIX for Advanced & Expert Users
Hello All,
I have the following input file that i'm trying to parse:
10.0.011.40
hadoop 15526 15524 0
hadoop 15528 15526 0
hadoop 19747 4018 1
10.0.081.227
hadoop 2862 2861 0
hadoop 2864 2862 0
hadoop 12177 14376 1
I'm trying to get this in my output file:
10.0.011.40 15526 15528... (2 Replies)
Discussion started by: ramky79
2 Replies
3. Shell Programming and Scripting
hi all
config.sh :
dhcp="0"
setip="1"
telnet="1"
ping="1"
main.sh
function dhcp {
}
function setip {
} (1 Reply)
Discussion started by: sadosan83
1 Replies
4. Shell Programming and Scripting
Hi
I'm just messing around with bash and trying to learn it because I have a course next semester dealing with OS design where we need to know how to use SSH client and either bash or ksh. I've never done shell scripting before.
I just started today and I was wondering how parsing files... (1 Reply)
Discussion started by: mehungry
1 Replies
5. Shell Programming and Scripting
Hi -
I am trying to do a simple config file with known variable names in it, e.g.:
contents of config file a.conf: -a
-b $work
-c $host
simplified contents of bash script file: work='trunk'
host='alaska'
opts=$(tr '\n' ' ' < a.conf)
opts="$opts $*"
mycommand $opts arg1 arg2
The... (3 Replies)
Discussion started by: mrengert
3 Replies
6. Shell Programming and Scripting
Hi,
i'm trying to parse a config file that have alot of rows similar to this one:
Example value value value
What i want to do is to split and save the row above in a hash, like this:
Example = value value value
Basically i want to split on the first whitespace after the first... (3 Replies)
Discussion started by: mikemikemike
3 Replies
7. Shell Programming and Scripting
Hi all, I've done some searching here but haven't found exactly what I'm looking for so I thought I'd post up and see if someone can help out.
I'm working on a shell script that I would like to store environment variables in an external file. I'm familiar with sourcing a file with variables in... (1 Reply)
Discussion started by: kungfusnwbrdr
1 Replies
8. 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
9. Shell Programming and Scripting
Hi All,
I have a requirement to parse a file.
Let me clear you all on the req.
I have a job which contains multiple tasks and each task will have multiple attributes that will be in the below format. Each task will have some sequence number according to that sequence number tasks shld... (0 Replies)
Discussion started by: rajeshorpu
0 Replies
10. Solaris
Guys im using bash and for me i think its the best shell, anyway which conf file related to bash ? is it $SHELL or .profile i want to add path to it so i dont need to type the full path of the binary file, i also want to configure the behaviour of the shell, please help. (1 Reply)
Discussion started by: XP_2600
1 Replies