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!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. UNIX for Dummies Questions & Answers
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
6. Shell Programming and Scripting
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
7. Solaris
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
8. AIX
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
9. Shell Programming and Scripting
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
10. UNIX for Beginners Questions & Answers
"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
LEARN ABOUT REDHAT
putenv
PUTENV(3) Linux Programmer's Manual PUTENV(3)
NAME
putenv - change or add an environment variable
SYNOPSIS
#include <stdlib.h>
int putenv(char *string);
DESCRIPTION
The putenv() function adds or changes the value of environment variables. The argument string is of the form name=value. If name does not
already exist in the environment, then string is added to the environment. If name does exist, then the value of name in the environment
is changed to value. The string pointed to by string becomes part of the environment, so altering the string changes the environment.
RETURN VALUE
The putenv() function returns zero on success, or -1 if an error occurs.
ERRORS
ENOMEM Insufficient space to allocate new environment.
NOTES
The putenv() function is not required to be reentrant, and the one in libc4, libc5 and glibc2.0 is not, but the glibc2.1 version is.
Description for libc4, libc5, glibc: If the argument string is of the form name, and does not contain an `=' character, then the variable
name is removed from the environment. If putenv() has to allocate a new array environ, and the previous array was also allocated by
putenv(), then it will be freed. In no case will the old storage associated to the environment variable itself be freed.
The libc4 and libc5 and glibc 2.1.2 versions conform to SUSv2: the pointer string given to putenv() is used. In particular, this string
becomes part of the environment; changing it later will change the environment. (Thus, it is an error is to call putenv() with an auto-
matic variable as the argument, then return from the calling function while string is still part of the environment.) However, glibc
2.0-2.1.1 differs: a copy of the string is used. On the one hand this causes a memory leak, and on the other hand it violates SUSv2. This
has been fixed in glibc2.1.2.
The BSD4.4 version, like glibc 2.0, uses a copy.
SUSv2 removes the `const' from the prototype, and so does glibc 2.1.3.
CONFORMING TO
SVID 3, POSIX, BSD 4.3
SEE ALSO
getenv(3), setenv(3), clearenv(3), unsetenv(3), environ(5)
GNU
1993-04-08 PUTENV(3)