Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- count=0
- while IFS= read -r line;
- do
- [[ $line != *[[:digit:]]* ]] && count=$(( count + 1 ))
- done < ~/.bashrc
- printf 'We have %d number of lines without digits \n' "$count"
- #!/bin/bash
- COUNT=0
- while read LINE;
- do
- RESULT = $(echo $LINE | grep -L "[0-9]" | wc -l)
- if [ $RESULT -eq1 ]; then
- COUNT=$((COUNT+1))
- fi
- done < ~/.bashrc
- echo "Line count: $COUNT"
- cat /etc/group | grep lightdm | tr -dc "0-9"
- #!/bin/bash
- for i in $(seq 1000)
- do
- echo " $i " >> file name
- done
- i="1"
- while [ $i -lt 5 ]
- do
- touch "ex$i"
- i=$[$i+1]
- done
- sudo cat /etc/default/useradd | grep -v [0-9]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement