Guest

Opera Tab Count (opera-tab-count.sh)

By: a guest on May 3rd, 2010  |  syntax: Bash  |  size: 0.28 KB  |  hits: 566  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. #!/bin/bash
  2. cd ~/.opera/sessions/
  3.  
  4. tab_count=`egrep 'window count=([0-9]*)' autosave.win | awk '{split($2, s, "="); print s[2]}'`
  5. #echo $tab_count
  6. window_count=`grep -c 'type=0' autosave.win`
  7. #echo $window_count
  8.  
  9. actual_count=$(($tab_count - $window_count))
  10. echo $actual_count