Skip to content

Instantly share code, notes, and snippets.

@iambowen
Last active December 21, 2015 22:38
Show Gist options
  • Save iambowen/6376228 to your computer and use it in GitHub Desktop.
Save iambowen/6376228 to your computer and use it in GitHub Desktop.
shell implementation
for i in {1..10}
do
  if [ "$(expr $i / 2)" -eq 0 ]; then
     echo `expr $i / 2`
   if
done
@XuefengWu
Copy link

for item in {1..10}
do    
    v= mode i
    if [ $v -eq 0 ]; then
        echo `expr $item / 2`
    fi  
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment