Wednesday, September 28, 2005

[UNIX] cat equivalent

cat1()
{
 dd if=$1 2>/dev/null
}
cat2()
{
 sed -e 's/ / /' $1
}
cat3()
{
 awk '{print}' $1
}
cat4()
{
 tr -s 1 1 < $1
}
cat5()
{
 paste $1 /dev/null
}
cat6()
{
 diff $1 /dev/null | sed -e 's/^< //' | awk 'NR>1 {print}'
}
cat7()
{
 gzip - < $1 | gunzip -
}
cat8()
{
 bzip2 - < $1 | bunzip2 -
}
cat9()
{
 perl -lane 'print' $1
}
cat10()
{
 grep '' $1
}
cat11()
{
 cp $1 /dev/tty
}
cat12()
{
 unix2dos < $1 | dos2unix
}

0 Comments:

Post a Comment

<< Home