Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. lsusb -v | awk '/iSerial/ {if ($2 == "3" || $2 == "2") {print $3}}'
  2.  
  3. #!/bin/sh
  4. string="asd11ds"
  5. output=$(lsusb -v | awk '/iSerial/ && ($2 == "3" || $2 == "2")) {print $3}')
  6. echo $output
  7. if [[$output==$string]];then
  8. echo"the two string are the same/are different"
  9. fi
  10.  
  11. output=$(lsusb -v | awk '/iSerial/ && ($2 == "3" || $2 == "2")) {print $3}')
  12.  
  13. #!/usr/bin/env bash
  14.  
  15. string="asd11ds"
  16. output=$(lsusb -v | awk '/iSerial/ && ($2 == "3" || $2 == "2")) {print $3}')
  17.  
  18. echo $output
  19.  
  20. if [[ "$output" == "$string" ]]; then
  21. echo "the two strings are same"
  22. else
  23. echo "the two strings are different"
  24. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement