I am trying to Print the value of $DISPLAY under my Shell script.
I have Following shell script which Exports the DISPLAY:
#!/bin/sh export DIPLAY=:10.0
Here, each time I need to change the Value manually to accomplish the task.
Can we make the DISPLAY value dynamic using command:
echo $DISPLAY 'Prints the current Display Value :10.0
I have tried with the below code but it won't assigns the DISPLAY value to the variable:
#!/bin/sh export DIPLAY=echo $DISPLAY
Below is the complete Code:
#!/bin/sh export DISPLAY=:10.0 export ANT_HOME=/home/abc/Desktop/Eclipse/plugins/org.apache.ant_1.9.2.v201404171502 cd /home/abc/Desktop/auto/Automation/xyz ant usage clean compile build run makexsltreports sendemail
I am running this shell script every hour using crontab job