Skip to content

Commit 9742144

Browse files
authored
add comment
1 parent 7b32332 commit 9742144

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

input_check.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#!/bin/bash
22

3+
# Check user int input with 7 digit function
4+
35
function checkinput(){
46
v_in=$1
5-
7+
8+
# check if input value matched interger 0-9 and 7 digit length
69
if [[ $v_in =~ ^[0-9]{1,6}$ ]] ;
710
then
811
echo "$v_in"
912
else
1013
echo "d"
1114
fi;
12-
}
15+
}

0 commit comments

Comments
 (0)