• Post Reply Bookmark Topic Watch Topic
  • New Topic

ProcessBuilder  RSS feed

 
Jessy Zhao
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We have a legacy unix shell script that takes a date format string as one of the parameters, such as `date %Y%m%d`. When we call the script via Java ProcessBuilder, it does not recognize the date command in the backquote.

Does anybody out there have any clue how this cab be achieved?

Thanks in advance
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jessy,

Try modifying your ProcessBuilder to match what I have below. I tested it on Linux using bash, not sure what you are using.


Good luck!

Darrin
 
Jessy Zhao
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Darrin,

It's perfect, works just the way we expect. You're genius!!!

Thanks so much and have a nice weekend,
Jessy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!