- ┌───| /usr/share/man ](me@main)[/bin/bash]|[19:55][p:14366][bn:45][j:0]► [0]
- └─$ shopt -s nullglob dotglob
- ┌───| /usr/share/man ](me@main)[/bin/bash]|[19:55][p:14366][bn:45][j:0]► [0]
- └─$ cd
- ┌───| ~ ](me@main)[/bin/bash]|[19:55][p:14366][bn:45][j:0]► [0]
- └─$ files=(~/testar/emptydir/*)
- ┌───| ~ ](me@main)[/bin/bash]|[19:56][p:14366][bn:45][j:0]► [0]
- └─$ (( ${#files[*]} )) || echo directory is empty
- directory is empty
- ┌───| ~ ](me@main)[/bin/bash]|[19:56][p:14366][bn:45][j:0]► [0]
- └─$ (( ${#files[*]} )) || echo directory is empty
- directory is empty
- ## Afterwards I put a file in ~/testar/emptydir/
- ┌───| ~ ](me@main)[/bin/bash]|[19:56][p:14366][bn:45][j:0]► [0]
- └─$ (( ${#files[*]} )) || echo directory is empty
- directory is empty
- ???
Untitled
Posted by Anonymous on Mon 8th Feb 2016 16:01
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.