Getting value from shell scripts

Randeep randeep123 at
Thu Oct 22 10:34:58 CEST 2015


I have wrote a shell script and defined in exec module.

exec get_streaming_data_usage {
        wait = yes
        program = "/bin/bash /scripts/
        input_pairs = request
        #output_pairs = reply
        shell_escape = yes
        #output = file

And I am executing in /usr/local/etc/raddb/sites-enabled/default

Script is as follows:
[root at freeradius ~]# cat /scripts/

#get the framed IP_address:
framed_ip_address = $1
#Get the usage in bytes:
data_usage = `grep "$framed_ip_address" /scripts/user-bandwidth.txt | cut
-d , -f 4`

How can I get the value of data_usage inside the file

Please help

Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]

[image: --]
Randeep Raman
[image: http://]

More information about the Freeradius-Users mailing list