some tips and tricks

Table of Contents

1 bc calculator

1.1 \(\Pi\) calculation

echo "scale=40; 4*a(1)" | bc -l -q

1.2 number base conversion

You can get a more accurate \(\Pi\) value by increasing "scale" value.

echo "obase=16;ibase=10;15" | bc

2 binary tools

2.1 strings

print the strings of printable characters in files. You can read strings in ELF files or libraries by it.

3 pdf tools

3.1 merge pdf files into one file

gs -q -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=output.pdf -dBATCH a.pdf b.pdf


Last Updated by Bao Hexing (HexingB@qq.com)