タグ

2010年10月3日のブックマーク (2件)

  • 上に行くcd作った - hitode909の日記

    シェルで,上のディレクトリに行くのがめんどくさくて,cd ../../../../とかしないといけなくて,指を痛める. 上に行くためのupっていうコマンドを作ることにした. その1 up 3ってやると,3つ上に行くのを作った. function up() { i=0 while [ $i -lt $1 ] do cd ../ i=`expr $i + 1` done } 使い方 % pwd /Users/fkd/co/dev/dotfiles % up 3 % pwd /Users/fkd %これは使いにくくて,cd ../../って打つときは,いくつ上に行くか考えながら,../って打ってる.これだと,先に数えておかないといけなくて,難しかった. その2 考えながら入力できるようにしてみた.引数の数だけ見る. function up() { i=0 while [ $i -lt $# ]

  • Coverage.py — Coverage.py 7.4.4 documentation

    Coverage.py Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not. Coverage measurement is typically used to gauge the effectiveness of tests. It can show which parts of your code are being exercised by tests, and which ar