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
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
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 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
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
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
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
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
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
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
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
stl_mi(4) Kernel Interfaces Manual stl_mi(4)
NAME
stl_mi - Software distribution master inventory files
DESCRIPTION
Each software product that is distributed as subsets for the setld(8) command has an associated master inventory file. The master inventory
file's name consists of the product's unique 3-letter name and a 3-digit version number with the string .mi for a suffix. The master inven-
tory file is used by the software kitting program kits(1) in producing software distribution packages.
A master inventory file contains one ASCII record, describing vendor-specified attribute information, for each file in the product kit.
Each record is composed of three fields which must be separated by TAB characters. The fields are: A 16-bit unsigned integer.
Bit 1 is the v (volatility) bit; when it is set, changes to the existing copy of the file can occur during kit installation. It is
usually set for log files required by applications. The remaining bits are reserved. Possible values for this field are therefore 0
or 2. The dot-relative (./) pathname of the file described by this record. Each pathname must appear only once in the master
inventory file. Pathnames must begin with a period (.). Records must be sorted in ascending ASCII sequence on this field. The name
of the subset containing the file. Standard system directories are not included in subsets; they are represented by the keyword
RESERVED in place of a subset name. Files that exist in the product hierarchy but are not distributed as part of any subset have a
minus sign (-) in this field. Files that share a gnode (links) must all be included in the same subset.
EXAMPLES
This example shows a section of the master inventory for a hypothetical layered product kit: 0 . RESERVED 0 ./usr/opt
RESERVED 0 ./usr/opt/OAT100 OATDCB100 0 ./usr/opt/OAT100/bin OATDCB100 0 ./usr/opt/OAT100/bin/attr OATDCB100 0
./usr/opt/OAT100/bin/dcb.spr OATDCB100 0 ./usr/opt/OAT100/bin/dcb_defaults OATDCB100 0 ./usr/opt/OAT100/bin/dcb_diag.sed
OATDCB100 0 ./usr/opt/OAT100/bin/docbld OATDCB100 0 ./usr/opt/OAT100/bin/unstamp OATDCB100 0 ./usr/opt/OAT100/lib OATDCB100 0
./usr/opt/OAT100/lib/br OATDCB100 0 ./usr/opt/OAT100/lib/br/README.dcb OATDCB100 0 ./usr/opt/OAT100/lib/br/attr.1
OATDCBDOC100 0 ./usr/opt/OAT100/lib/br/dcb.ps OATDCBDOC100 0 ./usr/opt/OAT100/lib/br/docbld.1 OATDCBDOC100 0
./usr/opt/OAT100/lib/br/docbld.5 OATDCBDOC100 0 ./usr/opt/OAT100/lib/br/unstamp.1 OATDCBDOC100 0 ./usr/opt/OAT100/lib/doclib
OATDCB100 0 ./usr/opt/OAT100/lib/doclib/templates OATDCB100 0 ./usr/opt/OAT100/lib/doclib/templates/conv.braces OATDCB100 0
./usr/opt/OAT100/lib/doclib/templates/conv.command OATDCB100 . . .
RELATED INFORMATION
invcutter(1), kits(1), newinv(1), setld(8) Guide to Preparing Product Kits delim off
stl_mi(4)