text=`cat file.conf`
val1=`echo "$text" | select_value 1`
val2=`echo "$text" | select_value 2`
[guest@localhost ~]$ a=1
[guest@localhost ~]$ b=2
[guest@localhost ~]$ c=3
[guest@localhost ~]$
[guest@localhost ~]$ [ $((a + b)) -eq $c ]
[guest@localhost ~]$ echo $?
0
[guest@localhost ~]$ [ $((a + b)) -lt $c ]
[guest@localhost ~]$ echo $?
1
[guest@localhost ~]$ [ $((a + b - 1)) -lt $c ]
[guest@localhost ~]$ echo $?
0
[guest@localhost ~]$ [ $((a + b)) -gt $c ]
[guest@localhost ~]$ echo $?
1
[guest@localhost ~]$ [ $((a + b + 1)) -gt $c ]
[guest@localhost ~]$ echo $?
0
[guest@localhost ~]$
[guest@localhost ~]$ text="word1@line1\nword2@line2\nword3@line3\nword2@line4"
[guest@localhost ~]$ v="word2"
[guest@localhost ~]$
[guest@localhost ~]$ echo -e "$text"
word1@line1
word2@line2
word3@line3
word2@line4
[guest@localhost ~]$ echo -e "$text" | sed -n '/^'$v'@/ s/^.*@//p'
line2
line4
[guest@localhost ~]$