Sponsored Content
Top Forums Shell Programming and Scripting $ variable resolution problem Post 302332434 by krishmaths on Thursday 9th of July 2009 06:05:17 AM
Old 07-09-2009
Thanks a lot! Using eval in front of touch worked.

Can you please explain the use of eval in this context?
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Resolution..??

When i start my pc after the installation of suse linux it ask me for resolution but not for graphical interface, for console, can i run a command to change it again? Thanx! (3 Replies)
Discussion started by: Linux_fan
3 Replies

2. IP Networking

Problem with name resolution?

I have an AIX4.3 box on our subnet, called LIMEST3.OURDOMAIN.CO.UK, with IP address 10.103.1.13 It has the following entry in its own /etc/hosts: 10.103.1.13 limest3 limest3.ourdomain.co.uk Now, if I ping limest3.ourdomain.co.uk or ping 10.103.1.13, the result is instant. However if I ping... (4 Replies)
Discussion started by: grimbleshanks
4 Replies

3. Solaris

Screen Resolution problem on Ultra 10 with Solaris 10

Hi, I have a Sun Ultra 10 (SPARC) with Solaris 10 installed. The screen resolution is very poor and grainy which I have been unable to rectify. Every time I try to set the resolution I get the following: 'The XServer does not support the XRandR extension. Runtime resolution changes to the... (5 Replies)
Discussion started by: patcom
5 Replies

4. Debian

Change resolution problem

Hi gurus I have notebook with connected external monitor. output of my xrandr looks like Screen 0: minimum 320 x 200, current 2960 x 1050, maximum 2960 x 1050 VGA connected 1680x1050+1280+0 (normal left inverted right x axis y axis) 478mm x 300mm 1680x1050 60.0*+ 1280x1024 ... (2 Replies)
Discussion started by: wakatana
2 Replies

5. Solaris

OpenWindows display resolution problem

Hi all! On my SPARC mashine I have changed the screen resolution from default to: output-device screen r1024x768x75, because the OBP picture too big (e.g. Sun Logo and OBP text). Now, after the system booting I have the problem with OpenWindows picture (e.g. the window manager does not display... (2 Replies)
Discussion started by: wolfgang
2 Replies

6. Shell Programming and Scripting

Problem with a variable withing a variable

hello there, basically im screwed with a variable that should take the last modification date of a file. my code is fileCreationTime=$(( `ls -l $fileName | tr -s " " | cut -d " " -f6` )) my problem arise coz when the code is executed and stored in a file the return value is 1993 and not... (4 Replies)
Discussion started by: thurft
4 Replies

7. Shell Programming and Scripting

problem in assigning value to variable have value fo other variable

my script is some thing like this i11="{1,2,3,4,5,6,7,8,9,10,11,}" echo "enter value" read value ..............suppose i11 x="$value" echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,} but its showing "i11" only. plz help me out to get desired... (10 Replies)
Discussion started by: sagar_1986
10 Replies

8. Debian

Xorg resolution/display size problem

Hello, I am running Debian 6.0 on a Sun Ultra 5 and the openbox window manager. The window is way larger than the screen and minimized icons go off the screen and I can't get them back. The mode is set to 1280x1024 in the Screen section of xorg.conf and Virtual is also set to 1280x1024 which is... (4 Replies)
Discussion started by: snorkack59
4 Replies

9. Red Hat

Screen Resolution Persistence Problem: RHEL 6.3

Good morning everyone, I have been having screen resolution issues with RHEL 6.3. Our current setup is a laptop connected to a KVM/IP server. This is the desired scenario: RHEL laptop Windows XP laptop KVM/IP server The RHEL laptop has the file /etc/gdm/Init/Default populated with... (3 Replies)
Discussion started by: rchaud10
3 Replies

10. Shell Programming and Scripting

Variable resolution in File content

I have a file File1 containing lines like below apple ${FRUIT}-Color orange ${FRUIT}-Color banana ${FRUIT}-Color Now, in my shell I'm reading the file like below while read FRUIT DESC; do echo $FRUIT $DESC; done < File1 which outputs - apple ${FRUIT}-Color orange ${FRUIT}-Color... (3 Replies)
Discussion started by: nexional
3 Replies
eval(n) 						       Tcl Built-In Commands							   eval(n)

__________________________________________________________________________________________________________________________________________________

NAME
eval - Evaluate a Tcl script SYNOPSIS
eval arg ?arg ...? _________________________________________________________________ DESCRIPTION
Eval takes one or more arguments, which together comprise a Tcl script containing one or more commands. Eval concatenates all its argu- ments in the same fashion as the concat command, passes the concatenated string to the Tcl interpreter recursively, and returns the result of that evaluation (or any error generated by it). Note that the list command quotes sequences of words in such a way that they are not further expanded by the eval command. EXAMPLES
Often, it is useful to store a fragment of a script in a variable and execute it later on with extra values appended. This technique is used in a number of places throughout the Tcl core (e.g. in fcopy, lsort and trace command callbacks). This example shows how to do this using core Tcl commands: set script { puts "logging now" lappend $myCurrentLogVar } set myCurrentLogVar log1 # Set up a switch of logging variable part way through! after 20000 set myCurrentLogVar log2 for {set i 0} {$i<10} {incr i} { # Introduce a random delay after [expr {int(5000 * rand())}] update ;# Check for the asynch log switch eval $script $i [clock clicks] } Note that in the most common case (where the script fragment is actually just a list of words forming a command prefix), it is better to | use {*}$script when doing this sort of invocation pattern. It is less general than the eval command, and hence easier to make robust in | practice. The following procedure acts in a way that is analogous to the lappend command, except it inserts the argument values at the start of the list in the variable: proc lprepend {varName args} { upvar 1 $varName var # Ensure that the variable exists and contains a list lappend var # Now we insert all the arguments in one go set var [eval [list linsert $var 0] $args] } However, the last line would now normally be written without eval, like this: | set var [linsert $var 0 {*}$args] | SEE ALSO
catch(n), concat(n), error(n), interp(n), list(n), namespace(n), subst(n), tclvars(n), uplevel(n) KEYWORDS
concatenate, evaluate, script Tcl eval(n)
All times are GMT -4. The time now is 06:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy