Попробуйте:
auto dummy0
iface dummy0 inet static
address 10.10.0.1
netmask 255.255.255.0
post-up ifconfig dummy0 multicast
Un camino por recorrer:
a=$(cat file1 | wc -c)
esto no genera el nombre del archivo y su expr
funcionará.
Otra forma de eliminar el nombre de archivo de wc
es usar wc -c <file1
. Esto evita el requisito de un segundo proceso cat
.
Yo usaría algo como:
if [ $(( $(wc -c < your-filehere ) % 2)) -eq 1 ]
then
echo file has odd number of bytes
else
echo file has even number of bytes
fi