04-12-2011
Doesn't get it outside, k=$(( $k + 3 )), so that is not an issue.
I like 11 as the right answer, so $ is necessary? Mult takes precedence over + ? Or left to right, it should be 15. Ugly! I always use paren. no priority applicable.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i am new to UNIX. I have couple of basic questions.
1. Is the syntax for BASH shell programming same in the LINUX and SUN SOLARIS operating systems?
2. I have to work on BASH shell programming in SUN SOLARIS operating system. I am going through the documentation from the following... (4 Replies)
Discussion started by: azazalis
4 Replies
2. Shell Programming and Scripting
Can any1 please help me...
i'm really lost in using bash shell scripting...
and i got to hand this up on monday...
please anyone teach me how to do this assignment...
Please use basic things because i just learn the program only... thanks
... (1 Reply)
Discussion started by: Fr0z3n999
1 Replies
3. Shell Programming and Scripting
wwww wwwwwwww wwwwwwwwwwwww (0 Replies)
Discussion started by: keyvan
0 Replies
4. Shell Programming and Scripting
Hi,
Actually i have written one test.sh (shell program) in bash.
Here i have a variables $a which stored the value package1.
Now I want to write a regular expression inside the if command that "if $a variable contains letter p in the begining of the value package1 then it is coming true.... (5 Replies)
Discussion started by: sunitachoudhury
5 Replies
5. Shell Programming and Scripting
Hi all,
Can anyone guide to get tricks for file handling in bash shell? Thanks in advance.
Thanks
Deepak (2 Replies)
Discussion started by: naw_deepak
2 Replies
6. Shell Programming and Scripting
#! /bin/sh
abcd = "Hello world"
if
then
echo $abcd
fi
i got error message that
line3 : abcd: command not found
line5 : [0: command not found
line5 : [1: command not found
i have no idea why i got this message. Can some one help me ??? (6 Replies)
Discussion started by: bonosungho
6 Replies
7. UNIX for Dummies Questions & Answers
i am new to shell scripting and stuck at one place in my program.
i am reading data from one structured file and extracting some data from particular lines and then writing into the output file. In that reading input file line by line from while loop.
while read line
do
rectype=line... (7 Replies)
Discussion started by: reeta_shri
7 Replies
8. Shell Programming and Scripting
Hello All,
I am setting up a cron job, where i am calling a shell script to make few builds. I got struck at a point, need some expert inputs to proceed further.
The script is categorized in 5 parts and in the last part while building software it asks for few questions like:-
1. Build mode... (4 Replies)
Discussion started by: sahil_jammu
4 Replies
9. UNIX for Dummies Questions & Answers
I'm having trouble trying to create a BASH shell script.
I want the user to input a command "cat file_name.c" and then the shell script will delete all comments "/* */" from file_name.c else exit.
So far I have this:
#!/bin/bash
read "cat file" // User will input command cat... (7 Replies)
Discussion started by: inkjoy00
7 Replies
10. UNIX for Dummies Questions & Answers
I do not know shell scripting. But at work place, I have got an in and out shell scripting task. I just need to understand a very big script. Is there any tool in which I can place the script and it can tell me the meaning of the whole script? (3 Replies)
Discussion started by: lg123
3 Replies
LEARN ABOUT X11R4
gai.conf
GAI.CONF(5) Linux Programmer's Manual GAI.CONF(5)
NAME
gai.conf - getaddrinfo(3) configuration file
DESCRIPTION
A call to getaddrinfo(3) might return multiple answers. According to RFC 3484 these answers must be sorted so that the answer with the
highest success rate is first in the list. The RFC provides an algorithm for the sorting. The static rules are not always adequate,
though. For this reason, the RFC also requires that system administrators should have the possibility to dynamically change the sorting.
For the glibc implementation, this can be achieved with the /etc/gai.conf file.
Each line in the configuration file consists of a keyword and its parameters. White spaces in any place are ignored. Lines starting with
'#' are comments and are ignored.
The keywords currently recognized are:
label netmask precedence
The value is added to the label table used in the RFC 3484 sorting. If any label definition is present in the configuration file,
the default table is not used. All the label definitions of the default table which are to be maintained have to be duplicated.
Following the keyword, the line has to contain a network mask and a precedence value.
precedence netmask precedence
This keyword is similar to label, but instead the value is added to the precedence table as specified in RFC 3484. Once again, the
presence of a single precedence line in the configuration file causes the default table to not be used.
reload <yes|no>
This keyword controls whether a process checks whether the configuration file has been changed since the last time it was read. If
the value is "yes", the file is reread. This might cause problems in multithreaded applications and is generally a bad idea. The
default is "no".
scopev4 mask value
Add another rule to the RFC 3484 scope table for IPv4 address. By default, the scope IDs described in section 3.2 in RFC 3438 are
used. Changing these defaults should hardly ever be necessary.
FILES
/etc/gai.conf
VERSIONS
The gai.conf file is supported by glibc since version 2.5.
EXAMPLE
The default table according to RFC 3484 would be specified with the following configuration file:
label ::1/128 0
label ::/0 1
label 2002::/16 2
label ::/96 3
label ::ffff:0:0/96 4
precedence ::1/128 50
precedence ::/0 40
precedence 2002::/16 30
precedence ::/96 20
precedence ::ffff:0:0/96 10
SEE ALSO
getaddrinfo(3), RFC 3484
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2016-03-15 GAI.CONF(5)