fork(7) download
  1. #!/bin/bash
  2.  
  3. read -p "Type smth: " text
  4. if [[ $text =~ ^[[:alnum:]_]+$ ]]
  5. then
  6. echo "ok"
  7. else
  8. echo "not ok"
  9. fi
Success #stdin #stdout 0.01s 5380KB
stdin
Something
stdout
ok