Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 62 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/bin/bash
  2.  
  3. haystack=`mv random1231 random112211  2>&1`
  4. needle="No such file or "
  5.  
  6.  
  7. case $needle in
  8.   # match start of string
  9.   $haystack*) echo yep, it matches at the start ;;
  10.  
  11.   # match end of string
  12.   *"$haystack") echo yep, it matches at the end ;;
  13.  
  14.   # searchString can be anywhere in thisString
  15.   *"$haystack"*) echo yep, it matches in the middle somewhere ;;
  16.  
  17.   *) echo Not found ;;
  18. esac
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top