I'm using the grep
command to extract active interfaces from the output of the scutil
command with the --dns
option.
$ scutil --dns | grep 'if_index'
I am suspecting if a user's machine with different system language (Spanish, Chinese, etc) the text 'if_index' will change and the above mentioned command will not produce the right result. Is my suspicion right? If so could someone tell what is the right way to perform the above operation?
Best Answer
If you look at the executable itself,
/usr/sbin/scutil
with thestrings
command you can see that those strings are hardcoded directly into the executable.Additionally this CLI's output remains the same when you try changing the
LANG=..
orLC_ALL=..
environment variables. For example:Doing this with another CLI tool such as
git
translates the output:All this leads me to believe that the output will not change.