Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Running a script on heroku and piping input and output
Don't expect pretty, it's a hack...
We need and END marker on the input because we have to tell the script to exit
$ cat > input.txt
a quick brown
fox jumple over the
laszy dog
END
$ heroku run "perl -pe 'exit if /^END$/; s/(\w)/\1\1/g;'" < input.txt > output.txt
$ cat output.txt
Running `perl -pe 'exit if /^END$/; s/(\w)/\1\1/g;'` attached to terminal... up, run.2
a quick brown
fox jumple over the
laszy dog
END
aa qquuiicckk bbrroowwnn
ffooxx jjuummppllee oovveerr tthhee
llaasszzyy ddoogg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.