Sponsored Content
Top Forums Shell Programming and Scripting rm:command not found in linux Bash shell script Post 302480684 by a1_win on Wednesday 15th of December 2010 01:39:11 PM
Old 12-15-2010
I am getting the following error while doing export $PATH
Code:
export $PATH
-bash: export: `/data/R12VIS/apps/tech_st/10.1.3/perl/bin:/data/R12VIS/apps/tech_st/10.1.2/bin:/data/R12VIS/apps/apps_st/appl/fnd/12.0.0/bin:
/data/R12VIS/apps/apps_st/appl/ad/12.0.0/bin:/data/R12VIS/apps/tech_st/10.1.3/appsutil/jdk/jre/bin:
/data/R12VIS/apps/apps_st/comn/util/unzip/unzip::/data/R12VIS/apps/tech_st/10.1.2/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:
/data/R12VIS/apps/tech_st/10.1.3/perl/bin:/data/R12VIS/apps/tech_st/10.1.2/bin:/bin:/data/R12VIS/apps/tech_st/10.1.3/appsutil/jdk/jre/bin:
/data/R12VIS/apps/apps_st/comn/util/unzip/unzip:/data/R12VIS/apps/tech_st/10.1.2/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:/usr/kerberos/bin:
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/data/R12VIS/apps/tech_st/10.1.3/appsutil/jdk/bin:/bin:/home/applmgr/bin:
/data/R12VIS/apps/tech_st/10.1.3/appsutil/jdk/bin:/bin:/home/applmgr/bin': not a valid identifier

Regards,

---------- Post updated at 02:37 PM ---------- Previous update was at 02:33 PM ----------

.bash_profile of the user 'abc':
Code:
. /data/R12VIS/apps/apps_st/appl/APPSVIS_lxs3er06.env

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

export PATH=$PATH:$HOME/bin

unset USERNAME
export SCRIPTS=/data/R12VIS/scripts
export DISPLAY=lxs3er06.solutions.glbsnet.com:0

---------- Post updated at 02:39 PM ---------- Previous update was at 02:37 PM ----------

Here's the script:
Code:
-bash-3.00$ cat XX_AOL_GEN_SCRIPT_RAMN.prog
#!/bin/bash


echo "Actual Parameter : "$*
export $FCP_LOGIN=`echo $* | cut -d " " -f1 | cut -d "=" -f2 | sed 's/"//g'`
echo "FCP_LOGIN : "$FCP_LOGIN
export $EXECUTE=`echo $* | cut -d " " -f5 | sed 's/"//g'`
echo "EXECUTE : "$EXECUTE
export $PATH=`echo $* | cut -d " " -f6 | sed 's/"//g'`
echo "PATH : "$PATH
cd $PATH
pwd
cd $PATH
rm -rf Concurrent_Program
mkdir Concurrent_Program
chmod 777 Concurrent_Program
cd Concurrent_Program
echo "Something to check On" > outputfile.txt1
-bash-3.00$


Last edited by Scott; 12-15-2010 at 02:46 PM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

#!/bin/bash and #1bin/sh command not found error on mac osx terminal/shell script

i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine. then last week i wrote capture.sh and it... (2 Replies)
Discussion started by: danpaluska
2 Replies

2. Shell Programming and Scripting

Command not found in shell script - stumped for 4 days

Hello, I like to begin with :wall:.. literally... It has been 4 days and I have no idea how to fix it. Environment - AIX 5.3 I wrote a script to call on ssh to log into another box via PKA to do something else. If I run the script on the terminal, it works 100%. If the SAP customised... (11 Replies)
Discussion started by: plonkagain
11 Replies

3. Shell Programming and Scripting

bash:vi:command not found

I downloaded and installed "Cygwin yesterday onto my PC running Windows XP. When I tried to type "vi" in Cygwin's window, I got the following message bash: vi: Command not found What shud i do inorder to get into vi editor Thanks (10 Replies)
Discussion started by: bobby1015
10 Replies

4. Shell Programming and Scripting

PLEASE HELP! LINUX BASH SHELL SCRIPT

PLEASE HELP! NEED LINUX SCTIPT Need to write a bash shell script to show information of employees of a department from a company data set. The script should accept a project number (1/2/3/10/20/30) and output * the name of the project * the name of the manager of the controlling... (1 Reply)
Discussion started by: help123
1 Replies

5. Homework & Coursework Questions

LINUX Bash Shell Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a bash shell script that presents work information of employees of a department from a company data... (1 Reply)
Discussion started by: help123
1 Replies

6. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

7. UNIX for Dummies Questions & Answers

Im new to bash scriping and i found this expression on a bash script what does this mean.

# check host value regex='^(||1|2|25)(\.(||1|2|25)){3}$' if ')" != "" ]; then if ]; then echo host $host not found exit 4 fi elif ]; then echo $host is an invalid host address exit 5 fi espeacailly the top regex part? ---------- Post updated at 06:58 PM ---------- Previous update was... (1 Reply)
Discussion started by: kevin298
1 Replies

8. Shell Programming and Scripting

"Command not found" doing a while loop in bash/shell

i=0 numberofproducts=${#urls} #gets number of entries in array called "urls" numberofproductsminusone=`expr $numberofproducts - 1` #-subtract by one while do wget ${urls} i=$(( $i + 1 )) sleep 10 done I'm getting an error ./scrape: line 22: [0: command not found that... (3 Replies)
Discussion started by: phpchick
3 Replies

9. Shell Programming and Scripting

Bash Script giving "Command Not found"

Hello Geeks, Greetings...I have the following script: #!/usr/bin/bash #Script to generate number of active PDP context & calculate PDP activation #failurefrom EPG-M #Script written by Gbenga Adigun #September 12, 2013 username="xxxxxx" password="xxxxxxxxx" HOSTS=( ggsn01... (6 Replies)
Discussion started by: infinitydon
6 Replies

10. Shell Programming and Scripting

Linux/bash Script only working if executed from shell prompt

Hi, maybe I'm asking a VERY dumb question, but would anybody out there tell me, why this f****** script won't work if executed as a cronjob, but works fine if executed from a shell prompt? #! /bin/bash set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin date >>... (3 Replies)
Discussion started by: beislhur
3 Replies
SYSLOGOUT(8)						      System Manager's Manual						      SYSLOGOUT(8)

NAME
syslogout - modular centralized shell logout mechanism DESCRIPTION
syslogout is a generic approach to enable centralized shell logout actions for all users of a given system in a modular and centralized way mostly aimed at avoiding work for lazy sysadmins. It has only been tested to work with the bash shell. It basically consists of the small /etc/syslogout shell script which invokes other small shell scripts having a .bash suffix which are con- tained in the /etc/syslogout.d/ directory. The system administrator can drop in any script he wants without any naming convention other than that the scripts need to have a .bash suffix to enable automagic sourcing by the /etc/syslogout script. For shell sessions, the contents of /etc/syslogout.d/" will be sourced by every user at logout if the following lines are present in his $HOME/.bash_logout: if [ -f /etc/syslogout ]; then . /etc/syslogout fi If used for X sessions it is advisable to include the former statement into the Xreset script of the X display manager instead to prevent that closing of an terminal emulator window yields unexpected results in your running X session if your X11 terminal emulator is using a login shell. Be sure then to run it under the user-id of the X session's user. See the example files in /usr/share/doc/syslogout/ for illustration. Users not wanting /etc/syslogout to be sourced for their environment can easily disable it's automatic mechanism. It can be disabled by simply creating an empty file called $HOME/.nosyslogout in the user's home directory using e.g. the touch(1) command. Any single configuration file in /etc/syslogout.d/ can simply be overridden by any user by creating a private $HOME/.syslogout.d/ directory which may contain a user's own version of any configuration file to be sourced instead of the system default. It's names have just to match exactly the system's default /etc/syslogout.d/ configuration files. Empty versions of these files contained in the $HOME/.syslo- gout.d/ directory automatically disable sourcing of the system wide version. Naturally, users can add and include their own private scripts to be automagically executed by /etc/syslogout at logout time. OPTIONS
There are no options other than those dictated by shell conventions. Anything is defined within the configuration scripts themselves. SEE ALSO
The README files and configuration examples contained in /usr/share/doc/syslogout/ and the manual page for bash(1), xdm(1x), xdm.options(5), and wdm(1x). Recommended further reading is everything related with shell programming. If you need a similar mechanism for executing code at login time check out the related package sysprofile(8) which is a very close compan- ion to syslogout. BUGS
syslogout in its current form is mainly restricted to bash(1) syntax. In fact it is actually a rather embarrassing quick and dirty hack than anything else - but it works. It serves the practical need to enable a centralized bash configuration until something better becomes available. Your constructive criticism in making this into something better" is very welcome. Before i forget to mention it: we take patches... ;-) AUTHOR
syslogout was developed by Paul Seelig <pseelig@debian.org> specifically for the Debian GNU/Linux system. Feel free to port it to and use it anywhere else under the conditions of either the GNU public license or the BSD license or both. Better yet, please help to make it into something more worthwhile than it currently is. SYSLOGOUT(8)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy