pastebin - collaborative debugging tool
bash.kpaste.net RSS


Untitled
Posted by Anonymous on Mon 8th Feb 2016 16:01
raw | new post

  1. ┌───| /usr/share/man ](me@main)[/bin/bash]|[19:55][p:14366][bn:45][j:0]► [0]
  2. └─$  shopt -s nullglob dotglob
  3.  
  4. ┌───| /usr/share/man ](me@main)[/bin/bash]|[19:55][p:14366][bn:45][j:0]► [0]
  5. └─$ cd
  6.  
  7. ┌───| ~ ](me@main)[/bin/bash]|[19:55][p:14366][bn:45][j:0]► [0]
  8. └─$  files=(~/testar/emptydir/*)                                                                                                                                                                                                  
  9.  
  10. ┌───| ~ ](me@main)[/bin/bash]|[19:56][p:14366][bn:45][j:0]► [0]
  11. └─$  (( ${#files[*]} )) || echo directory is empty
  12. directory is empty
  13.  
  14. ┌───| ~ ](me@main)[/bin/bash]|[19:56][p:14366][bn:45][j:0]► [0]
  15. └─$  (( ${#files[*]} )) || echo directory is empty
  16. directory is empty
  17.  
  18. ## Afterwards I put a file in ~/testar/emptydir/
  19.  
  20. ┌───| ~ ](me@main)[/bin/bash]|[19:56][p:14366][bn:45][j:0]► [0]
  21. └─$  (( ${#files[*]} )) || echo directory is empty
  22. directory is empty
  23.  
  24. ???

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at