Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Binary-search/UNIX-Shell/binary-search-1.sh
Normal file
11
Task/Binary-search/UNIX-Shell/binary-search-1.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/ksh
|
||||
# This should work on any clone of Bourne Shell, ksh is the fastest.
|
||||
|
||||
value=$1; [ -z "$value" ] && exit
|
||||
array=()
|
||||
size=0
|
||||
|
||||
while IFS= read -r line; do
|
||||
size=$(($size + 1))
|
||||
array[${#array[*]}]=$line
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue