Advertisement
Guest User

Shellcheck

a guest
May 20th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. $ shellcheck test.sh
  2.  
  3. In test.sh line 1:
  4. for i in 1;
  5. ^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang.
  6. ^-- SC2043: This loop will only ever run once for a constant value. Did you perhaps mean to loop over dir/*, $var or $(cmd)?
  7.  
  8.  
  9. In test.sh line 6:
  10. projectfolder= `ls -l| grep "1*"` ;; #trying to identify individual folders 101-121
  11. ^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
  12. ^----------------^ SC2092: Remove backticks to avoid executing output.
  13. ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
  14. ^-- SC2010: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.
  15. ^--^ SC2063: Grep uses regex, but this looks like a glob.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement