08-01-2008
question in .bash_profile
We are more users using the oracle account, and people want to include theyr own files in .bash_profile. Like this:
while [ "$LOGNAME" = "oracle" -o -z "$LOGNAME" ]; do
echo -n "LOGNAME is '$LOGNAME' (no sens), who are you? " >/dev/stderr
read ln
export LOGNAME=$ln
done
This works well when logging in to the system, ssh, su - and in crontab. Now I have to run some scripts from roots crontab like this. su - oracle -c "command" 1>error.1.log 2>error.2.log
And all I get in this log is, over end over and over.
LOGNAME is '' (no sense), who are you?
Some suggestions?
Thanks in advance.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
Can anyone tell me if it is at all possible to edit ones .bash_profile, to make the setting on of line numbers (in vi/vim), permanent?
I've been to a few IRC channels and people keep telling me it is more of a vi/vim thing and to use something called ".vimrc", however I heard that it is... (3 Replies)
Discussion started by: zorrokan
3 Replies
2. Shell Programming and Scripting
Hi Guys,
I modified my .bash_profile script , and tried to change the prompt.
Following is the line of code in my .bash_profile script.
export PS1=" \W "
But I get the output as:
\W
This appears to be my prompt now.
Any idea what should be done..
Thanks! (0 Replies)
Discussion started by: nua7
0 Replies
3. UNIX for Dummies Questions & Answers
Hi all. when i connect as user megaguru i have a problem my .bash_profile does not working^:(
if i do:
. ./.bash_profile
all enviroment variables are in place. How can i force linux to use .bash_profile before logon process?
thanx in advance. (1 Reply)
Discussion started by: smallman
1 Replies
4. Shell Programming and Scripting
Hello Friends,
I was trying to give a text/welcome message to a specific user just after his login.
For that i had added a echo test message line in .bash_profile of that user.
Which is not working ....
Also i had to execute a script on his login
for that i had tried to enter the... (6 Replies)
Discussion started by: NIMISH AGARWAL
6 Replies
5. Solaris
I am using solaris 10 x86. I have created a .bash_profile under root's home directory(/). The contents of the file are:
Solaris10u8/# cat .bash_profile
export PATH=$PATH:/usr/sfw/bin
export PS1='\h\w\$ '
export PAGER="less -imsq"
alias ll='ls -l'
alias la='ls -a'
The problem is that:
... (7 Replies)
Discussion started by: proactiveaditya
7 Replies
6. UNIX for Advanced & Expert Users
Hi,
happy new year.
on AIX 6.1 , for user oracle , there are two files :
bash_profile and .profile
I do not know which one is executed when login ? How to know ,
More over in both of them we have :
in .profile :
ORACLE_HOME=/appli/oracle/product/10.2.0/db_1... (5 Replies)
Discussion started by: big123456
5 Replies
7. Shell Programming and Scripting
Hi,
I wanted to do the following, but the command does not seem to work. Any ideas or suggestions please help.
#1. If the particular ENV variable IMPACT_HOME is not there in a file
grep -q IMPACT_HOME infile || sed -i 'i IMPACT_HOME=/my/new/path' infile
#2. If the ENV variable... (4 Replies)
Discussion started by: dbashyam
4 Replies
8. Red Hat
Hi,
Unexpectedly i entered wrong entries in .bash_profile for my user which has administrative permissions. So, i am getting errors for every command. I dont have backup file also, so any body can help me how to recover it.
Regards,
Mastan (7 Replies)
Discussion started by: mastansaheb
7 Replies
9. UNIX for Dummies Questions & Answers
Hi All
Please can you tell , what is the difference between bash_profile and bashrc. How to create them? (8 Replies)
Discussion started by: fretagi
8 Replies
10. UNIX for Dummies Questions & Answers
Hello everyone,
I'm trying to set my .bash_profile to change my primary prompt from this:
banbatchtest1v:MCPPRD:~>to this:
banbatchtest1v:MCPPRD:/home/rcarvall>
Here's what my .bash_profile looks like right now:
# .bash_profile
# Get the aliases and functions
if ; then
.... (2 Replies)
Discussion started by: galileo1
2 Replies
LEARN ABOUT X11R4
sendmsg
SENDMSG(1) General Commands Manual SENDMSG(1)
NAME
sendmsg - send a message via Internet
SYNOPSIS
sendmsg [ -46vVfrmMl ] [ -u 'from' ] [ -s 'message' ] recipient
DESCRIPTION
sendmsg sends a one line text message to the terminal(s) of the specified recipient.
On the receiving site there must be a SAFT-server (Simple Asynchronous File Transfer) installed, like the sendfiled and the recipients ter-
minal must be writeable.
The recipient address can be specified as:
user
a local user or a sendfile alias (see below), e.g.: framstag
user@host
an user on a remote host, e.g.: framstag@bofh.belwue.de
saft://host/user
like above, but in URL-syntax, e.g.: saft://bofh.belwue.de/framstag
saft://host:port/user
like above, but with alternate SAFT-port, e.g.: saft://bofh.belwue.de:4870/framstag
OPTIONS
-4, -6 Explicitly force IPv4 or IPv6 connections. By default, the program will try to resolve the name given, and choose the appropriate
protocol automatically. If resolving a host name returns both IPv4 and IPv6 addresses, sendmsg will try to use the adresses in
the order they are returned by the resolver.
-v Verbose mode: show SAFT protocol messages.
-V Show version information and exit.
-f Force sending of messages and ignore tty (re)settings.
-r Reply to last received message.
-m Receive messages only on this tty. This is the default.
-M Allow receiving messages on other ttys.
-l Allow sending of multiline messages messages.
-s 'message'
Send directly message.
-u 'from'
Set sender to from instead of $LOGNAME.
-q Quiet mode: print no transfer messages.
EXAMPLES
sendmsg neg@linux.rus.uni-stuttgart.de
message: how about lunch?
FILES
/etc/sendfile.deny
Users which are not allowed to receive files or messages (set by root).
/var/spool/sendfile/$LOGNAME/config/restrictions
List of addresses from where you don't want messages or files. The format is:
user@host [mfb]
m stands for messages, f for files and b for both. Wildcards * and ? are allowed. Examples:
gates@microsoft.com b
*aol.com m
/var/spool/sendfile/$LOGNAME/config/aliases
The sendfile alias file. Format:
alias address
Example:
chief grmblfz@bigvax.somewhere.net
SEE ALSO
sendfile(1).
AUTHOR
Ulli Horlacher - framstag@rus.uni-stuttgart.de
3rd Berkeley Distribution SENDMSG(1)