How to pass command line arguments to <file.js> when using truffle exec? --

truffle exec <file.js> <arg1> <arg2> ...
  • Your are on node, so you can use process.argv or any other library that parses the command line, you might have to require('process') like any other javascript file. – Ismael May 3 '18 at 16:01
  • @Ismael you are right, process.argv works. If you bother to put up an answer I'll accept it. – Jerry Ji May 4 '18 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.