Can some one tell me what is the meaning of each line with an example ,
I am not getting why regex is used and even [!0122...] Can some one tell me what is the meaning of each line with an example ,
I am not getting why regex is used and even [!0122...]
#!/bin/sh
is_integer ()
{
case "${1#[+-]}" in
(*[!0123456789]*) return 1 ;;
('') return 1 ;;
(*) return 0 ;;
esac
}