2008年6月24日火曜日

phpのエラー

  • Allowed memory size of 33554432 bytes exhausted
  • /etc/php5/php.iniを書き換える.

[Vine]
memory_lilmit = 128MB

文字コードを一気に変換

$ find -name '*.tex' -o -name '*.cls' -o -name '*.sty' | xargs nkf --overwrite -e -Lu

ubuntuのbashのプログラマブル補完

  • /etc/bash_completionに書いてあるので,~/.bashrcに以下を追加すればよい.これでxdviで.dviのみ候補になったりしてくれる.

if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

2008年6月19日木曜日

ubuntuのシェルスクリプトでエラー

$ cat test.sh
#!/bin/sh

list=(a b c)

for i in ${list[@]}; do
echo $i
done

$ ./test.sh
./test.sh: 3: Syntax error: "(" unexpected
  • 一行目を,#!じゃなくて,#にしたら偶然動いた.
$ cat test.sh
#/bin/sh

list=(a b c)

for i in ${list[@]}; do
echo $i
done

$ ./test.sh
a
b
c
  • 確かに一行目の/bin/shを消しても実行できるな.

2008年6月12日木曜日

acrobat readerで,数値が許容範囲外です。のエラー