Guest User

Untitled

a guest
Oct 19th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. sub get_arc_header {
  2.  
  3. my $command=@_;
  4.  
  5. #run command, get output
  6.  
  7. my $c=`expect -c \"
  8. spawn /usr/bin/nmc -c \\\"$command\\\"
  9. expect
  10. sleep 15
  11. send \003
  12. \"`;
  13. #Return ^Time string
  14. #my @arr=split (/\n+/, $c);
  15. # @arr = grep /\s*Time/, @arr;
  16. # @arr=split (/\s+/, @arr[0]);
  17. # my $ref=\@arr;
  18. # print Dumper($ref);
  19. #compare commands output should not be equivalent
  20. }
  21.  
  22. #ok (!eq_set (get_arc_header("show performance arc -x"),get_arc_header("show performance arc")));
  23. get_arc_header("setup folder testvol/a property userquota");
  24.  
  25. "test.pl" 30L, 663C written
  26. ----------------
  27.  
  28. root@myhost:/volumes/regression-tests# ./test.pl
  29. send: spawn id exp6 not open
  30. while executing
  31. "send "
  32. # No tests run!
Add Comment
Please, Sign In to add comment