MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3uyl7s/daily_programming_puzzles_at_advent_of_code/cxp58x4/?context=3
r/programming • u/Aneurysm9 • Dec 01 '15
179 comments sorted by
View all comments
Show parent comment
1
In one line:
sed -E "s/\(/+1/g;s/\)/-1/g;s/\+//" inputfile | bc -l
I love sed :)
sed
View all comments
Show parent comment
1
u/ThereOnceWasAMan Dec 06 '15
In one line:
sed -E "s/\(/+1/g;s/\)/-1/g;s/\+//" inputfile | bc -lI love
sed:)