Most powerful examples of Unix commands or scripts every programmer should know

后端 未结 25 2035
遇见更好的自我
遇见更好的自我 2021-01-29 18:14

There are many things that all programmers should know, but I am particularly interested in the Unix/Linux commands that we should all know. For accomplishing tasks that we may

25条回答
  •  遇见更好的自我
    2021-01-29 18:35

    for card in `seq 1 8` ;do  
      for ts in `seq  1 31` ; do 
         echo $card $ts >>/etc/tuni.cfg;
       done
     done 
    

    was better than writing the silly 248 lines of config by hand.

    Neded to drop some leftover tables that all were prefixed with 'tmp'

    for table in `echo show tables | mysql quotiadb |grep ^tmp` ; do
      echo drop table $table
    done
    

    Review the output, rerun the loop and pipe it to mysql

提交回复
热议问题