I'm trying to uncomment (removing #) the line sql
.
session {
radutmp
#
# See "Simultaneous Use Checking Queries" in sql.conf
# sql
}
This is what I've tried:
sed -i 's/# sql/ sql/' /etc/freeradius/sites-available/inner-tunnel
But somehow the spaces are not correctly calculated. It doesn't find # sql
.
Following melpomene it looks like the input file is using tabs instead of spaces. You can use the [:blank:]
character class which includes both tabs and spaces:
sed '/#[[:blank:]]*sql/s/#//' file
The command matches lines with the sequence #
, zero or more spaces followed by the term sql
and removes the first #
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments