cat data.txt | ruby -pe \"$_.split.map {|n| eval n+\'*3\'}*\' \'\" > aab.txt

쉘에서 돌리세요