Skip to content

Instantly share code, notes, and snippets.

@miku
Created April 16, 2012 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miku/2401956 to your computer and use it in GitHub Desktop.
Save miku/2401956 to your computer and use it in GitHub Desktop.
bash script with array works on linux not on mac os x
#!/bin/bash
declare -a directory_contents=($(ls .))
test -e ${directory_contents[0]}
echo $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment