#!/bin/bash if [ -n $1 ]then num_carac= `wc -c $1` echo $1 "tiene" $num_carac "caracteres"else echo "Error no se ha introducido ningún parámetro"fi
num_carac= `wc -c $1`
A="hola"
A= "hola"
num_carac=`echo $1 | wc -c`
echo -e "Leo" | tr -d '\n' | wc -c
#!/usr/bin/bashname="Leo"echo -e "`expr length $name`";
#!/usr/bin/bashname="Leo";echo -e "${#name}";
echo -e "Hola" | perl -ne 'print length($_) - 1, "\n"'
(( 1 / 0 )) &> /dev/null || { echo -e "stderrrrrrrrrrrrrrrrrrr";}