Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. mysqldump --user=$dbuser --password=$dbpswd
  2. --host=$host $mysqldb | gzip > $filename
  3.  
  4. VAR=$((your-command-including-redirect) 2>&1)
  5.  
  6. #!/bin/bash
  7. BLAH=$((
  8. (
  9. echo out >&1
  10. echo err >&2
  11. ) 1>log
  12. ) 2>&1)
  13.  
  14. echo "BLAH=$BLAH"
  15.  
  16. { error=$(command 2>&1 1>&$out); } {out}>&1
  17.  
  18. { error=$(ls /etc/passwd /etc/bad 2>&1 1>&$out); } {out}>&1 >output
  19.  
  20. result=$(mysqldump --user=$dbuser --password=$dbpswd
  21. --host=$host $mysqldb 3>&1 2>&3 | gzip > $filename)
  22.  
  23. $ dd if=/dev/zero count=50 > /dev/null
  24. 50+0 records in
  25. 50+0 records out
  26.  
  27. $ dd if=/dev/zero count=50 2> countfile | wc -c
  28. 25600
  29. $ cat countfile
  30. 50+0 records in
  31. 50+0 records out
  32. $ mail -s "countfile for you" thornate < countfile
  33.  
  34. $ variable=`cat countfile`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement