Вот bash-скриптец, пользуйтесь на здоровье:
cat ./fwcon.sh
#!/bin/bash
if [ $# -ge 2 ]
then
case "$1" in
-e) keys="enable" ;;
-d) keys="disable" ;;
esac
shift
for param in "$@"
do
fwconsole trunks --$keys $param
done
else
echo -e "Command for change of state several trunks in Freepbx.\n"
echo -e "Usage: "
echo -e "fwcon -e <№ trunk> ... <№ trunk> - for DISABLE trunks"
echo -e "fwcon -d <№ trunk> ... <№ trunk> - for ENABLE trunks"
echo -e "You need to use command 'fwconsole reload' after this command for apply changes."
fi
Можно сделать алиас на команду, если надо:
alias fwtrunk=/<path to script>/
fwcon.sh