Reset environment - ".. /etc/.environment dev_env"


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Reset environment - ".. /etc/.environment dev_env"
# 1  
Old 01-11-2007
Question Reset environment - ".. /etc/.environment dev_env"

I have been resently working on some ksh script. One of the line in the file writes:
.. /etc/.environment dev_env
I can not understand what this mean, all I know is .environment is unix system environment file. Is ".." a command? If some one can give me some clue where can I find information to explain this line. Thanks in advance.
# 2  
Old 01-11-2007
Does this script actually work? I tried this with ksh:

.. /etc/profile

gave me an error saying that "ksh: ..: cannot execute"

Which is right, as ksh does not interpret ".." the same as ".". ".." is the parent directory and that obviously cannot be executed.
# 3  
Old 01-11-2007
You need add . in front of profile. Try .. /.profile. Thanks.
# 4  
Old 01-11-2007
Are you saying that ". .. /.profile" will work? I don't think so. Get rid of that space between the ".." and the "/.profile".
# 5  
Old 01-12-2007
I know this is from a real application. The line is
.. /etc/.environment dev_env
dot dot space then /etc/.environment. The .environment is a hiden system file, just like the profile you used in your trial. dot in the front of the files for all of sytem files, log, environment, ect. If you put .. /etc/.profile in unix, will it work?
# 6  
Old 01-12-2007
Quote:
Originally Posted by zzwu3591
I know this is from a real application. The line is
.. /etc/.environment dev_env
dot dot space then /etc/.environment. The .environment is a hiden system file, just like the profile you used in your trial. dot in the front of the files for all of sytem files, log, environment, ect. If you put .. /etc/.profile in unix, will it work?
Not in general. It is possible that a private .. command has been defined somehow. On the other hand, a single dot is the normal way to handle stuff like this. So real ap or no, I would suspect a typo.
# 7  
Old 01-12-2007
Quote:
Originally Posted by Perderabo
It is possible that a private .. command has been defined somehow.
I tried it using alias, and it works! Just a simple "alias ..=." allows you to run commands like .. /home/xyz/.profile. Talk about flexibility!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

"SQLPLUS -S " is not working in one environment where same code is working in another

"SQLPLUS -S " is not working in one environment where same code is working in another getting below error =================================== SQL*Plus: Release 11.2.0.3.0 Production Copyright (c) 1982, 2011, Oracle. All rights reserved. Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus... (1 Reply)
Discussion started by: yogendra.barode
1 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. AIX

Can we directly edit "/etc/environment" file in AIX using vi ?

Hi Is it recommended to edit the file "/etc/environment" directly using vi ? (like by adding some export something= value staements) or do we need to edit /etc/profile file in order to set the environment variables, globally to the entire AIX LPAR please suggest. (5 Replies)
Discussion started by: System Admin 77
5 Replies

4. Solaris

Solaris Operating Environment Installation CD, aka "CD0" PN: 704-7076-10

Hi to all. It is need to install Solaris 2.5.1 on Sun Enterprise 220r and 420r. Share somebody Solaris Operating Environment Installation CD, aka "CD0" PN: 704-7076-10 ... It is very necessary! ! ! PM or ftp link.... :D (4 Replies)
Discussion started by: aivengoff
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

Giving a name to a Terminal in "Xfce" desktop environment

Hi, I work noramly with 3/4/5 Terminals (not xterms) open. In the different Terminal I set different tools (software). Unfortunately I loose easily the overview of all these Terminals. Which setup is in which Terminal? It would be nice to have a possibility to name Termianls. By the way I work... (4 Replies)
Discussion started by: hooge789
4 Replies

7. Shell Programming and Scripting

What is the "NAME" environment variable used for ?

Hi all, I am running Solaris and I just find there is an environment variable called "NAME" set in my .profile. I googled it for a while and still don't know what is this variable used for (I think it is different as USERNAME or USER?)? When I used mailx to send emails to my PC (thought... (4 Replies)
Discussion started by: qiulang
4 Replies

8. Shell Programming and Scripting

Invoking commands in "parent" environment

The below shell script obtains a command and an alias from the user then appends the alias to the users ~/.aliases file. It is useful with cd commands and saves typing; instead of going cd /foo/bar/bonk/boo/what/whatelse/dir I create an alias something like "godir". It's not done and I will... (2 Replies)
Discussion started by: whosit1963
2 Replies

9. Shell Programming and Scripting

How to get environment of a "fresh" login shell?

Hello fellow *nix users! I am a bit confused how could I get an environment of a "fresh/clean" login shell, that is, the environment at that moment when user has started e.g. a new terminal/console or so. So this is the sequence of actions I should be able to do in a single shell session: ... (6 Replies)
Discussion started by: Miikka
6 Replies

10. UNIX for Dummies Questions & Answers

"$" in environment variable

Hi, I have a problem with retreiving the value of an environment variable. The name of the variable is: DIR$INP I am not able to change the name of the variable, because it is used by programs to which I do not have access to. The variable contains the name of a directory as value. I have... (6 Replies)
Discussion started by: lamac
6 Replies
Login or Register to Ask a Question

Featured Tech Videos