I am trying to run a jar file in a shell script. And I want to assign the out put of that jar file and echo it out. I tried something like below.
#!/bin/bash
$the_output = "$(java -jar portalOutputFormater.jar $1 $2 $3 $4 2>&1 )"
echo the_output
My java program returns the output as 'output=var1_var2_var3_var4" for the four input parameters. But I am getting the output as..
portaloutputformatter.sh: line 3: =output=var1_var2_var3_var4: command not found
What I am I doing wrong here? I just need to run my jar file then assign it to variable and output the variable.
Thank You !