DISPLAY Script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting DISPLAY Script
# 8  
Old 11-04-2008
This is an example how you can reset a variable with another script:

example.sh:

Code:
#!/bin/sh

myvar="First"

echo "The value of myvar before calling setvar.sh: $myvar"

. ./setvar.sh

echo "The value of myvar after calling setvar.sh: $myvar"

exit 0

setvar.sh:

Code:
#!/bin/sh

myvar="Second"

# Don't use an exit statement here!

Regards
# 9  
Old 11-10-2008
And Hello Again

Most Simple Solution :
Bash or Sh Shell
and ". ./bash.sh"

It Correctly changes the DISPLAY ip and does NOT start a new process for the script


So far : yaay
But : ONCe Again.
If i use the Script i get
Quote:
Error: Can't open display: 10.4.xxx.xx:0.
If i do the SAME command
Quote:
export DISPLAY=`echo $SSH_CLIENT | cut -d " " -f1`:0.0
by hand : it works ..

Once Again : Strange shit
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with script to display space usage

Hi all, I am looking for help with a script for displaying the space available from a df - h command for / (root). The problem is: If it is below 700 MB I have jobs that are failing... Is there a way I can do a calculation? If it above 700 MB it is good, if it is below 700 MB it will fail.... (5 Replies)
Discussion started by: gartie
5 Replies

2. Shell Programming and Scripting

Script with ^M causes display issue with cat or more

I have a script to do a couple simple but repetitive commands on files that are provided to us. One of the things is to get rid of the line feeds. This is the section that is causing problems, i even cut this section into its own file to make sure nothing else was affecting it. #!/usr/bin/bash... (4 Replies)
Discussion started by: oly_r
4 Replies

3. Shell Programming and Scripting

Help with Display Shell Script

hi Friends, I am writing a shell script to extract data from sar logs for my daily analysis. I have this in sar logs HP-UX dhpcdbe1 B.11.31 U ia64 05/09/12 01:22:42 device %busy avque r+w/s blks/s avwait avserv 01:27:59 disk30 8.79 13.72 26 427 36.47 ... (3 Replies)
Discussion started by: kunwar
3 Replies

4. Shell Programming and Scripting

How to display a counter in shell script?

Hi, I am writing a script which processes large number of files in a directory. I wanto display a counter which increment after processing each file. I am processing each file in a for loop. If I echo a variable with its value increasing with each file, I will get around 5000 lines as output.... (10 Replies)
Discussion started by: jaiseaugustine
10 Replies

5. UNIX Desktop Questions & Answers

Script that will display a short message

Can anyone point me to the right direction on how to write a simple script that will display a message on any terminal when implemented? Basically I need it so the script runs at a certain time, say April 30, 2010 and that the message will be displayed to me no matter which terminal I am logged... (2 Replies)
Discussion started by: jmack123
2 Replies

6. Shell Programming and Scripting

Script to display

I have script which prints following o/p ServerName = server1 Proc0 :Temperature 61 Proc1 :Temperature 60 CPU 99.4% idle, Now since i have to feed this data to another java program i want the out put as follows Name Proc0 Temp Proc1 Temp CPU... (5 Replies)
Discussion started by: fugitive
5 Replies

7. Shell Programming and Scripting

script to display time

hey folks, i am stuc in this problem. You all might help me out. I want to write a BASH script to display time every 15 seconds using %r field descriptor. And want to clear the window each time before displaying time using clear command. Please help me out (3 Replies)
Discussion started by: manojrsb
3 Replies

8. Shell Programming and Scripting

Script to display time difference..

Hi i've written a script which reads last two line of the log file from N number of servers and send the mail by redirecting to a particular log file. And the two lines is displayed below. Oracle Q03 Begin Hot BACKUP Time: 07/23/08 18:35:46 Oracle Q03 End Hot BACKUP Time: 07/24/08 14:18:15... (1 Reply)
Discussion started by: suri.tyson
1 Replies

9. UNIX for Dummies Questions & Answers

Shell Script Display?

I remember learning that there is a way to make a shell script display the script itself to standard output while the script is being executed but I can't find how to do that. Any pointers? (2 Replies)
Discussion started by: wmosley2
2 Replies
Login or Register to Ask a Question