This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Unix/windows - sh/bat file problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unix/windows - sh/bat file problem" Watch "Unix/windows - sh/bat file problem" New topic

Unix/windows - sh/bat file problem

kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122

I am using batch this batch file-

Also this sh file-

Both of these files were working fine until i introduced "CONFIG_ROOT".

if i am putting in batch file this way it's doing fine--
-DConfigRoot="c:/settings" -

Can you please tell me what i am missing?

Joe Ess

Joined: Oct 29, 2001
Posts: 8915

The '$' dereferences environment variables in Unix shells. The leading and trailing '%' dereferences the same in Windows. You have it right with every other variable in your script.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122
Yes Jo, Its working fine.

Thanks for your reply.
GeeCON Prague 2014
subject: Unix/windows - sh/bat file problem