Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Issue with variables via cronned script Post 302464286 by Ariean on Tuesday 19th of October 2010 04:38:08 PM
Old 10-19-2010
Thanks all for your replies

Vbe,
I updated the profile with your excerpt code and when i source my profile it returned interactive? what does it mean? Thank you.

DGPickett,
Below is the profile setup page, please let me know what is wrong in here, Thank you.
Quote:
EDITOR=vi; export EDITOR
set -o vi

ORACLE_HOME=/orcl/app/oracle/product/11.1.0.7; export ORACLE_HOME
SYBASE=/3rdparty/sybase/ocs/12_5; export SYBASE
INFORMATICA=/apps/informatica/v7; export INFORMATICA
PATH=$PATH:/usr/bin:/usr/sbin:/usr/ucb:/usr/ccs/bin:$INFORMATICA/server/bin:$ORACLE_HOME/bin; export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMATICA/server/bin:$ORACLE_HOME/lib:$ORACLE_HOME/odbc/lib:/lib:/usr/openwin/lib:/usr/lib; export LD_LIBRARY_PATH

LANG=C; export LANG
LC_ALL=C; export LC_ALL
LC_TYPE=C; export LC_TYPE
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG

INT_SRV=tt_prd; export INT_SRV
TT_DOMAIN=Domain_turntable; export TT_DOMAIN
INFA_HOME=/apps/informatica/v8.6.1; export INFA_HOME

TA=/ADP_Impact_TT_Input; export TA
TX=/Impact_TT_Archive; export TX
TI=/Internal_Impact_TT_Input; export TI
TL=/Impact_TT_Load; export TL
TO=/ADP_Impact_TT_Output; export TO
TF=/product/apps/feeds/TT; export TF
TS=/product/apps/informatica/v7/pc/ScriptLogs; export TS
TT=/product/apps/informatica/v7/pc/TgtFiles; export TT
TE=/product/apps/informatica/v7/pc/ExtProc; export TE

ttyname=$(/usr/bin/tty)
today=$(/bin/date +'%Y%m%d')
HISTDIR=$HOME/.sys/hists
HISTFILE=$HOME/.sys/hists/$today.${ttyname##*/}
HISTSIZE=500

if [ ! -d "$HISTDIR" ]
then
mkdir -p 700 -m $HISTDIR
fi

alias cda='cd /ADP_Impact_TT_Input'
alias cdx='cd /Impact_TT_Archive'
alias cdi='cd /Internal_Impact_TT_Input'
alias cdl='cd /Impact_TT_Load'
alias cdo='cd /ADP_Impact_TT_Output'
alias cdf='cd /product/apps/feeds/TT'
alias cds='cd /product/apps/informatica/v7/pc/ScriptLogs'
alias cdt='cd /product/apps/informatica/v7/pc/TgtFiles'
alias cde='cd /product/apps/informatica/v7/pc/ExtProc'
alias cdT='cd /product/apps/informatica/tools'

# Setup prompt
standout=`tput smso`
standend=`tput rmso`
HOSTNAME=`hostname`
PS1=
PS1C=$PS1
PS1=$standout\$PWD$standend'
$PS1C'
PS1="
${PS1} $LOGNAME@$HOSTNAME# "
export PS1 PS1C
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Issue with parsing config variables

I am using MKS tool kit on windows server. One config variable is defined in windows environment and I am trying to use that variable. # Below RootDir is defined in windows RootDir="\\f01\var" # in unix script details="$RootDir/src|$RootDir/tgt" src=`echo $details|awk -F '|' '{print... (1 Reply)
Discussion started by: madhukalyan
1 Replies

2. UNIX for Dummies Questions & Answers

testing variables issue

oh,i don't understand my shell file like this #!/bin/sh # # testnum=$(ifconfig eth0|sed -n 8p|awk '{print $2}'|cut -c7-) echo $testnum sleep 2 echo $testnum sleep 2 echo $testnum sleep 2 echo $testnum but the output was always the same value like # ./test.sh 3779052732 3779052732... (8 Replies)
Discussion started by: flw521521
8 Replies

3. Shell Programming and Scripting

White spaces issue with shell variables

Hi all, I've a requirement as below Source file src.txt sample data: A<10 white spaces>B12<5 white spaces>C<17 white spaces> A1<5 white spaces>B22<5 white spaces>C13<17 white spaces> when I'm fetching a record from this file into a shell variable like below: vRec=`head -1 src.txt... (2 Replies)
Discussion started by: madhu_1126
2 Replies

4. Shell Programming and Scripting

Awk script problem - Variables Causing Issue

can someone please explain to me what i'm doing wrong with this code: WELT=$(awk '(($1 ~ "^${caag}$") || ($2 ~ "^${caag}$"))' /tmp/Compare.TEXT) when run from the command line, it works. but it seems to be having a problem doing the comparison when variables are involved. i tested from... (1 Reply)
Discussion started by: SkySmart
1 Replies

5. Shell Programming and Scripting

awk issue expanding variables in ksh script

Hi Guys, I have an issue with awk and variables. I have trawled the internet and forums but can't seem to get the exactt syntax I need. I have tried using awk -v and all sorts of variations but I have hit a brick wall. I have spent a full day on this and am just going round in circles. ... (3 Replies)
Discussion started by: gazza-o
3 Replies

6. Shell Programming and Scripting

Scripting Issue with Variables from awk

Greetings all, Disclaimer: I'm a novice and always welcome best practices as I'm learning. File example: 100,1.1.1.1,1.1.1.2,10.10.10.1,172.16.1.10,172.16.1.20 101,1.1.2.1,1.1.2.2,10.10.20.1,172.16.2.10,172.16.2.20 102,1.1.3.1,1.1.3.2,10.10.30.1,172.16.3.10,172.16.3.20 ...and so on ... (3 Replies)
Discussion started by: sjrupp
3 Replies

7. Shell Programming and Scripting

Running a script with multiple variables like 25 variables.

Hi All, i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way?? #!/bin/ksh ##script is sample.ksh age=$1 gender=$2 class=$3 . . .... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies

8. Shell Programming and Scripting

Issue in shell script variables

Hi, I have a file at $HOME/t.txt, below is file content cat $HOME/t.txt CUSTOMER_${REGION}.out Am using this file content in one script $HOME/samp.sh, below is the script #!/bin/bash REGION=USA x=`cat ${HOME}/t.txt` echo $x Am getting following output.. CUSTOMER_${REGION}.out ... (3 Replies)
Discussion started by: shieksir
3 Replies

9. Solaris

Solaris 8 ssh issue - $SSH_ORIGINAL_COMMAND undefined variables

I face a weird question I don't know how to deal with. I tried to limit the permission of root user to remote login using ssh. So I did the following for a client server, 1. edit /usr/local/etc/sshd_config and modify as below PermitRootLogin forced-commands-only 2. using pubkey... (7 Replies)
Discussion started by: bestard
7 Replies

10. Shell Programming and Scripting

Issue nesting variables in csh.

The variables given are already defined ($file1-$file3, $obsid1-$obsid3, and $n=3). When I go to run the code, the terminal outputs "Missing }." I believe the error is with the nesting of variables. It would save a lot of time getting this while loop working. set i = 1 while (${i} <=... (5 Replies)
Discussion started by: ojdefdidit
5 Replies
profile(4)                                                         File Formats                                                         profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.10 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy