Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Both sides next revision
code:bash [2015/04/21 18:16]
::ffff:91.65.185.203
code:bash [2026/02/05 15:21] (current)
84.138.194.42
Line 1: Line 1:
- 
 ====== bash ====== ====== bash ======
 ===== bashrc ===== ===== bashrc =====
Line 35: Line 34:
     [ $1 ] || { echo -ne "\033[0m>>> usage: $0 <target>\n" >&2; exit 1; }     [ $1 ] || { echo -ne "\033[0m>>> usage: $0 <target>\n" >&2; exit 1; }
  
-  # pipes+  ### pipes 
 +  ## sqlite to html
     sqlite3 ex1 'select * from tbl1' | awk '{printf "<tr><td>%s<td>%s\n",$1,$2 }'     sqlite3 ex1 'select * from tbl1' | awk '{printf "<tr><td>%s<td>%s\n",$1,$2 }'
  
 +  ### tools
 +  ## remove html
 +    lynx -dump 
 + 
 ===== ip and gateway ===== ===== ip and gateway =====
  
Line 68: Line 72:
  
 </code> </code>
-==== youtube-dl ====i=-+ 
 +==== youtube-dl ====
  
 * https://github.com/rg3/youtube-dl.git * https://github.com/rg3/youtube-dl.git
Line 82: Line 87:
 ==== mysql ==== ==== mysql ====
  
-ex='mysql -u root -pxxx mydb -e ' +  ex='mysql -u root -pxxx mydb -e ' 
-min() { echo $(( $1 < $2 ? $1 : $2 )); } +  min() { echo $(( $1 < $2 ? $1 : $2 )); } 
-i=470;m=479; while [[ (( $i =< $m )) ]]; do +  i=470;m=479; while [[ "$i" -le "$m]]; do 
     a=$i;b=$(min $((i+2)) $m);i=$((i+3));                                                                                                             a=$i;b=$(min $((i+2)) $m);i=$((i+3));                                                                                                        
     $ex "insert into postlabel (fsid,lsid) values ($a, $b)"; done;     $ex "insert into postlabel (fsid,lsid) values ($a, $b)"; done;
 +    
 +    
 +echo "test?"
  

Log In