Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Revisions

3 of 6
Copy edited. More representative link text.
Peter Mortensen
  • 31.3k
  • 22
  • 110
  • 134

This Stack Overflow answer was the only one to trap space and dash chars:

# For null cmd arguments checking 
export to_check=' -t'
export space_n_dash_chars=' -'
[[ $to_check == *"$space_n_dash_chars"* ]] && echo found
Yordan Georgiev
  • 5.5k
  • 2
  • 60
  • 58

AltStyle によって変換されたページ (->オリジナル) /