Skip to content

Commit 77b1f44

Browse files
authored
Update input_check.sh
1 parent d32b317 commit 77b1f44

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

input_check.sh

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

3-
# Check user int input with 7 digit function
4-
53
function checkinput(){
64
v_in=$1
75

8-
# check if input value matched interger 0-9 and 7 digit length
96
if [[ $v_in =~ ^[0-9]{1,6}$ ]] ;
107
then
118
echo "$v_in"
129
else
1310
echo "d"
1411
fi;
15-
}
12+
}

0 commit comments

Comments
 (0)