Sponsored Content
Top Forums Shell Programming and Scripting Simple question (for you guys, hard for me) Post 302156120 by gus2000 on Monday 7th of January 2008 10:38:37 AM
Old 01-07-2008
When you run a script, it executes in a subshell. That subshell has its own environment space, so things like $PWD (or any set variable) will be lost. To paraphrase: "What happens in a subshell stays in a subshell."

Therefore, you canot use a script to change the current working directory of your login shell. You could define an alias, or a function, which would run in the current shell. But the script can't do it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Experts Only! Hard Question Ahead!!!!

SunOS5.8 is a radical departure from SunOs4.X in many ways. one of the important differences is the handling of devices. Adding devices under SunOS4.x required a kernel reconfiguration, recompliation and reboot. Under SunOS5.X, this has changed with the ability to add some drivers on the fly.... (1 Reply)
Discussion started by: Foo49272
1 Replies

2. UNIX for Advanced & Expert Users

Please Help.... Desperate need! Hard Question!

I know pipelined processors have issues with interupts.... but why? And does the architecture of the CPU affect the kind of software that can run on it? If someone could help me out that would be awsome. My boss came to me with this question and I can't find anything on the web helping me out.... (1 Reply)
Discussion started by: Sparticus007
1 Replies

3. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

4. UNIX for Dummies Questions & Answers

hard/soft link question

I am curious about one thing. Lets say I have a file file-a to which new generations are created on demand by simply archiving it (ex: file-a.tar.gz) and having the new one created with the same original filename file-a. Now what I want to know is if I create a hard/soft link to file-a, what... (1 Reply)
Discussion started by: Browser_ice
1 Replies

5. AIX

Hard Drive Question

Good day, I have an rs/6000 server, model 7044-270. I bought a 2nd hard drive for it but im not sure its the right one. (fru:H13060) As you surely know, the 7044-270 hard drives are put in some sort of tray/carrier. There is a cable that will interface the HDD with the tray/carrier so the... (0 Replies)
Discussion started by: Netghost
0 Replies

6. UNIX for Dummies Questions & Answers

[question] hard exercise, help needed

Hello guys. Well, on this exercise i need the average "chargeAmount" per hour (for each hour). with this code : cat getusagesummarywrongmatch | grep -iv MOU2GRTObject | cut -d'|' -f4,14 | grep -i chargeamount | cut -d' ' -f2 http://img227.imageshack.us/img227/5889/65969235do0.jpg i got... (2 Replies)
Discussion started by: EnioMarques
2 Replies

7. UNIX for Advanced & Expert Users

hard question

I have a directory containing a series of files of the format: A2008001231000.L2 I only care about the 6-8 digits, so the files are effectively: ?????---*.L2 I have files that range from ?????001*.L2 to ?????366*.L2 It should be noted these three digits represent the julian day of the... (2 Replies)
Discussion started by: msb65
2 Replies

8. Shell Programming and Scripting

Simple Script looking for Hard Coded Variables

Hi Guys Looking for a little help with a script to grep all files looking for hard coded variables - ie its IP address... so we know which files to look at before an IP change... This is what I have - but it seems to loop and never end... Any better suggestions? #!/usr/bin/ksh #simple... (2 Replies)
Discussion started by: serm
2 Replies

9. UNIX for Dummies Questions & Answers

Simple example for soft and hard links

Hai, give me a simple example for soft and hard links. this will work for soft link ?? ln -s (2 Replies)
Discussion started by: Ramesh M
2 Replies

10. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies
doc::lua-oocairo-fontopt(3)				       Lua OO Cairo binding				       doc::lua-oocairo-fontopt(3)

Name
       lua-oocairo-fontopt - options controlling text rendering

Introduction
       A font options object contains options that tell Cairo how to render text on surfaces.  They can be created with the "font_options_create"
       function in the main oocairo module (see lua-oocairo(3)), and retrieved from scaled fonts or context objects with "get_font_options"
       methods.

       Font options objects can be compared with the "==" operator.  Two different objects with the same options set will be considered equal.

Methods
       The following methods are available on font options objects:

       opt:copy ()
	   Returns a new font options object, with identical options to opt.  The two objects will be completely independent, so you can set them
	   to have different options.

       opt:get_antialias ()
	   Get the current antialiasing mode, which will be one of the strings accepted by the "opt:set_antialias()" method.

       opt:get_hint_metrics ()
	   Returns the current hint metrics option, which will be one of the same strings accepted by the "opt:set_hint_metrics()" method.

       opt:get_hint_style ()
	   Get the kind of font hinting done when rendering text.  Returns one of the strings accepted by the "opt:set_hint_style()" method.

       opt:get_subpixel_order ()
	   Returns the current ordering of colour components in pixels used for subpixel rendering, which will be one of the same strings accepted
	   by the "opt:set_subpixel_order()" method.

       opt:hash ()
	   Return a number which can be used as a hash key identifying the particular options in opt.  That is, if you wanted to cache fonts
	   according to the options set on them, you could store them in a table with this hash value as the key.  Two font options objects with
	   the same options will have the same hash value.

       opt:merge (srcopt)
	   Add any options which are set to a non-default value in srcopt to opt if that still has the default value from them.  The options in
	   srcopt will be unchanged.  Nothing is returned.

       opt:set_antialias (antialiastype)
	   Set the antialiasing mode used for drawing.	The argument must be a string or boolean value accepted by the "set_antialias" method on
	   context objects (see lua-oocairo-context(3)).

       opt:set_hint_metrics (hintmetrics)
	   Set the kind of hinting to be applied to the metrics, as opposed to outlines, of the glyphs in a font.  The hintmetrics value must be
	   one of the following strings:

	   default
	   off
	   on
       opt:set_hint_style (hintstyle)
	   Set the kind of font hinting done when rendering text.  The hintstyle value must be one of the following strings:

	   default
	   none
	   slight
	   medium
	   full
       opt:set_subpixel_order (order)
	   Used to inform Cairo of the arrangement of colour components in the pixels of a display device like a monitor.  Only applies if
	   subpixel antialiasing is used.  The order value must be one of the following strings:

	   default
	   rgb
	   bgr
	   vrgb
	   vbgr

	   The last two options refer to vertical arrangements of colours.

1.4								    2011-05-18					       doc::lua-oocairo-fontopt(3)
All times are GMT -4. The time now is 11:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy