Commit 405c03ea authored by Samarth Joshi's avatar Samarth Joshi

Bug Fix: redirecting output to out01 instead of stdout

parent 82e84692
sed 's/!/\n/g;s/-/ /g' $1 | awk '/^U/{y=y+$2; print "U\t("x","y")"} /^D/{y=y-$2; print "D\t("x","y")"} /^L/{x=x-$2; print "L\t("x","y")"} /^R/{x=x+$2; print "R\t("x","y")"} BEGIN {x=0;y=0} END {print "Final Position: ("x","y")"}'
sed 's/!/\n/g;s/-/ /g' $1 | awk '/^U/{y=y+$2; print "U\t("x","y")"} /^D/{y=y-$2; print "D\t("x","y")"} /^L/{x=x-$2; print "L\t("x","y")"} /^R/{x=x+$2; print "R\t("x","y")"} BEGIN {x=0;y=0} END {print "Final Position: ("x","y")"}' > out01
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment