Command not found error while executing shell programs in terminal

I have written one sample shell program.
while executing shell program in terminal,it shows COMMAND NOT FOUND error.
How to slove this.

Post the "Actual" error.  It says more than command not found.
Post your script.
Post the output from:
echo $PATH
Post the output from:
which name_of_command_not_found

Similar Messages

  • Command not found error while executing a shell script

    Hello,
    I am a newbie to linux.I am attaching the code which gives me following errors..
    error list:
    1. no such file or directory enviornemnt
    2. command not found
    3. ambiguous redirectline
    Script
    cd $HOME/wkdir
    rm /tmp/*.log
    # source environment
    . ./env
    # Run the install script to setup the database
    # Configure SH account
    sqlplus "/ as sysdba" <<! > /tmp/perflab_install.log 2>&1
    grant connect, resource, dba to SH;
    alter user sh account unlock;
    # create the fetch_n_rows procedure
    sqlplus "$PERFLAB_USER" <<! >> /tmp/perflab_install.log 2>&1
    drop index sales_time_bix;
    drop index sales_time_idx;
    create index sales_time_idx on sales(time_id) compute statistics;
    -- fetch_n_rows: fetches 'n' rows from the specified statement --
    CREATE OR REPLACE PROCEDURE fetch_n_rows(
    stmt VARCHAR,
    name VARCHAR,
    nexec NUMBER := 1,
    nrows NUMBER := 0,
    debug BOOLEAN := FALSE)
    IS
    -- Local variables
    curs INTEGER := null;
    rc INTEGER;
    nexec_it INTEGER := 0;
    nrows_it INTEGER;
    BEGIN
    dbms_application_info.set_module('DEMO', name);
    WHILE (nexec_it < nexec)
    LOOP
    curs := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(curs, stmt, DBMS_SQL.NATIVE);
    rc := DBMS_SQL.EXECUTE(curs);
    nrows_it := 0;
    LOOP
    IF (dbms_sql.fetch_rows(curs) <= 0 OR (nrows <> 0 AND nrows_it = nrows
    THEN
    EXIT;
    ELSE IF (debug = TRUE)
    THEN
    DBMS_OUTPUT.PUT_LINE(nrows_it);
    END IF;
    END IF;
    nrows_it := nrows_it + 1;
    END LOOP;
    DBMS_SQL.CLOSE_CURSOR(curs);
    nexec_it := nexec_it + 1;
    END LOOP;
    dbms_application_info.set_module(null, null);
    END fetch_n_rows;
    show errors
    # Start the workload
    . ./start_workload.sh > /tmp/setup_perflab.log 2>&1
    # Wait two minutes for workload to get going
    sleep 120
    # Modify snapshot interval
    sqlplus -s /NOLOG <<EOF >> /tmp/setup_perflab.log 2>&1
    connect / as sysdba
    set head on
    set feedback on;
    set pagesize 40
    rem -- event to allow setting very short Flushing interval
    alter session set events '13508 trace name context forever, level 1';
    rem -- change INTERVAL setting to 2 minutes
    rem -- change RETENTION setting to 6 hours (total of 180 snapshots)
    execute dbms_workload_repository.modify_snapshot_settings(interval => 2,-
    retention => 360);
    EOF
    Note : start_workload.sh is also in the same directory..
    Any help would be greatly appreciated.

    Please put your script between "code" format delimiters.
    http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
    You can add the line "set -x" at the beginning of your script to see at which line it fails? I suspect the . ./env line.

  • Class not found error while executing jar file

    I have written a java code in which i am connecting to database....when i run the class file using......java class_filename it works........
    but when i run the jar file using .......java -jar jar_name ...yi gives me the error as 'Class not found'......
    can anybody help me please......
    Thanks and Regards,
    Siddhesh

    that class is part of jar file.....in classpath i have included zip files for jdbc ...to get databse connection.....and the jar being executed ................still it gives the error ClassDefnotfound which i think is due to database connection problem.....the exception is raised while.....
    Class.ForName("Driver_name").newInstance();/ This driver is present in zip files that i have added in classpath....
    above statement doesn,t giv error while i execute the class file............but exception while executing jar file only..
    Thnaks and regards,
    siddhesh

  • [SOLVED] /bin/bash: endif: command not found ERROR while saving in vim

    My .vimrc file
    set expandtab
    set number
    syntax on
    set autoindent shiftwidth=4
    set smartindent
    set tabstop=4
    set smartcase
    colorscheme elflord
    set incsearch
    set hlsearch
    au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !chmod +x <afile> | endif | endif
    " Tell vim to remember certain things when we exit
    " '10 : marks will be remembered for up to 10 previously edited files
    " "100 : will save up to 100 lines for each register
    " :20 : up to 20 lines of command-line history will be remembered
    " % : saves and restores the buffer list
    " n... : where to save the viminfo files
    set viminfo='10,\"100,:20,%,n~/.viminfo
    function! ResCur()
    if line("'\"") <= line("$")
    normal! g`"
    return 1
    endif
    endfunction
    augroup resCur
    autocmd!
    autocmd BufWinEnter * call ResCur()
    augroup END
    On some files, I get this error http://i.imgur.com/lKFvm.png at the bottom of vim . Please note that I get the error not on all files. Its driving me crazy!
    Last edited by shadyabhi (2011-09-11 02:41:52)

    Replace this:
    au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !chmod +x <afile> | endif | endif
    with this:
    au BufWritePost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent execute "!chmod a+x <afile>" | endif | endif
    If the above doesn't work for you (though it should in Vim > 7), try a different way of doing the same thing:
    function ModeChange()
    if getline(1) =~ "^#!"
    if getline(1) =~ "/bin/"
    silent !chmod a+x <afile>
    endif
    endif
    endfunction
    au BufWritePost * call ModeChange()
    Last edited by bohoomil (2011-09-11 02:29:58)

  • Terminal troubles. Command not found error in the directory of the command.

    I'm getting a "command not found" error when I am in the directory of the command I want to run. For example try to run 'mysql' in the directory with that executable file and I get the error. BUT, if I put the full path to the mysql command, starting from the root, the command works correctly.
    I know this isn't a PATH issue, since I'm in the location of the file.
    It seems like a possible permissions issue, but I appear to have the proper permissions to the command and all parent directories. Moreover, I would assume that I would see a "permissions denied" error rather than a "command not found" error if this was the case.
    Beyond the two possibilities above, I'm stumped as to what the issue could be. To be clear, this is happening on more than one command, although both commands are within the /usr/local/ directory.
    Any help would be greatly appreciated!!! Thanks in advance!

    By default . is not included in your PATH and the shell does not do this on its own, as that is an easy way for someone to get a user to execute a Trojan.
    For example, in a multi-user system you create a script 'ls' and put it in a directory with a bunch of other stuff. Then go over to a user on the same system and ask them to help you with something in this directory. The first thing they will do is issue the 'ls' command, which if you have . in your PATH, or the shell always looks in the current working directory, means this user would execute the Trojan script instead of the real 'ls' command. That script do do anything using the privileges of the user running that script, including modifying stuff in their home directory that could give the person asking for help future access to that user's files and data.
    That is why . (the current working directory) is NOT part of PATH by default and shells do not look in the current working directory by default.

  • Class not found error while accessing a Web Service

    Hi All,
    Im getting a Class not found error while doing method calls of a third party API.
    The required jars(axis.jar) are set in the weblogic 8.1 classpath and I tried putting those jars(axis.jar) in my application lib folder also, but dint help. Please help me with a solution.
    I'll paste the exception logs here by
    java.lang.NoClassDefFoundError: org/apache/axis/AxisFault
    at java.lang.ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;(SecureClassLoader.java:123)
            at java.net.URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;(URLClassLoader.java:251)
            at java.net.URLClassLoader.access$100(Ljava/net/URLClassLoader;Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;(URLClassLoader.java:55)
            at java.net.URLClassLoader$1.run()Ljava/lang/Object;(URLClassLoader.java:194)
            at jrockit.vm.AccessController.do_privileged_exc(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;I)Ljava/lang/Object;(Unknown Source)
            at jrockit.vm.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;(Unknown Source)
    Thanks
    Noufal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    Verify the 3rd party class files names are correctly written in your program. Sometimes wrong case might be the reason.
    bye for now
    sat

  • Operation not found error while calling AM methods from managed bean

    Hi,
    operation not found error while calling AM methods from managed bean.
    written a method with two parameters in AM.
    exposed the method in AM client interface
    in the page bindings added the method in method action ..left empty in the value fields of the parameters.
    calling the method from managed bean like below
    String userNameVal = (String)userName.getValue();
    String passwordVal = (String)password.getValue();
    OperationBinding operationBinding =
    ADFUtils.findOperation("verifyLogin");
    operationBinding.getParamsMap().put("userName",userNameVal);
    operationBinding.getParamsMap().put("password",passwordVal);
    operationBinding.execute();
    i am getting operation verifyLogin not found error.Please suggest me something to do.
    Thanks
    Satya

    Hi vlsn,
    Can you try with the below code
    // in your backing bean
    OperationBinding operation = bindings.getOperationBinding("verifyLogin");
    //Put your both parameters here
    operation.getParamsMap().put("parameter_name1", parameterValue1);
    operation.getParamsMap().put("parameter_name2", parameterValue2);
    operation.execute();
    if (operation.getResult() != null) {
    Boolean result = (Boolean) operation.getResult();
    and share the result.
    regards,
    Rajan

  • It shows the log sequence not found error while all the log seqences exist?

    Why the database shows the log sequence not found error while all the log seqences exist?
    SQL> select*from v$log_history;
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    1 657328345 1 1 519368 13-JUN-08 543434
    519368 13-JUN-08
    2 657370849 1 2 543434 13-JUN-08 567705
    519368 13-JUN-08
    3 657373012 1 3 567705 14-JUN-08 570408
    519368 13-JUN-08
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    4 657373039 1 4 570408 14-JUN-08 570464
    519368 13-JUN-08
    5 657374623 1 5 570464 14-JUN-08 573505
    519368 13-JUN-08
    6 657375015 1 6 573505 14-JUN-08 573856
    519368 13-JUN-08
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    7 657376537 1 1 570465 14-JUN-08 573543
    570465 14-JUN-08
    8 657377084 1 2 573543 14-JUN-08 575109
    570465 14-JUN-08
    9 657377094 1 3 575109 14-JUN-08 575114
    570465 14-JUN-08
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    10 657377103 1 4 575114 14-JUN-08 575121
    570465 14-JUN-08
    11 657377106 1 5 575121 14-JUN-08 575123
    570465 14-JUN-08
    11 rows selected.
    RMAN> flashback database to sequence=10 thread=1;
    Starting flashback at 14-JUN-08
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=155 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of flashback command at 06/14/2008 13:03:15
    RMAN-20206: log sequence not found in the repository

    Apart from the output being hardly readable (please refer to the FAQ in the right upper hand corner how to post output), I don't see any sequence 10.
    You seem to mistake the column recid for the sequence column.
    The sequences are listed in -not surprisingly- the sequence# column.
    Sybrand Bakker
    Senior Oracle DBA

  • Page not found error while opening sharepoint 2013 site

    page not found error while opening sharepoint 2013 site 
    Please help me on this

    Hi,
    Please check the log file to find more information about this issue. The path of the log file is:
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS.
    In addition, please make sure the URL of the site is correct.
    Please check whether you could access other pages in the problematic site.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Page not found Error while open install app

    I go through the all necessary steps to configure app domain & steps to create SharePoint hosted app still got 'page not found error'
    The final app URL that i got afte r open install app -"http://app-125e72eedbe144.domain name:9922/FirstApp/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fsp1%3A9922&SPLanguage=en-US&SPClientTag=6&SPProductNumber=15.0.4420.1017&SPAppWebUrl=http%3A%2F%2Fapp-125e72eedbe144.domainname%3A9922%2FFirstApp"
    i don't understand where i did mistake can any one help me to resolve that issue.

    Hi,
    According to your post, my understanding is that you get the “page not found” error while you open install app.
    You need to have a SharePoint Web Application that is bonded to port 80 without a host header.
    If you want to run it on https (SSL) then you also need to add an extra binding for SharePoint Hosted Apps to work.
    For more information, please refer to:
    Troubleshooting SharePoint 2013 Hosted Apps on-premises: “404 not found” error
    404 & 401 Errors with the App Management Service - SharePoint
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Aerender CC 2014 returns "command not found" error on Mac 10.9.3?

    Well, that about sums it up. I'm trying to run aerender in Terminal and I just get a command not found error.
    Here's the batch script: "aerender -project /Volumes/xxx/After_Effects_Templates/xxx.aep -comp "Final_Web_800x600" -OMtemplate 800x600 H.264-output /Volumes/xxx/Renders/rendertest.mov"
    Anyone know what I'm doing wrong?
    Many thanks in advance.
    Bettsy

    Hi wsrphoto,
    You need to follow these steps.
    1. Launch creative cloud application.
    2. Go to Preferences and go to Account tab.
    3. Sign out from there and then quit creative cloud application.
    4. Launch Creative cloud again and log-in back again
    5. Then download and install the product.
    Please revert if you still face any issue.

  • Shell Commands not found error when running application

    Hello,
    Im using MonoDevelop IDE in my Mac, before it used to work fine but after few days, now when I'm opening the application nothing happens., i checked the Console  for the log and it says this
    May  9 21:29:39 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x52052].com.ximian.monodevelop[1510]: /Applications/MonoDevelop.app/Contents/MacOS/monodevelop: line 17: dirname: command not found 
    May  9 21:29:39 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x52052].com.ximian.monodevelop[1510]: /Applications/MonoDevelop.app/Contents/MacOS/monodevelop: line 31: //mono-version-check: No such file or directory
    May  9 21:29:39 Sri-Vishnu-Totakuras-MacBook-Pro com.apple.launchd.peruser.501[599] ([0x0-0x52052].com.ximian.monodevelop[1510]): Exited with code: 1
    I thought may be some error with the "dirname" command, so i commented it in the code and gave the path of directory myself and then the console shows up like this.
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: /Applications/MonoDevelop.app/Contents/MacOS//mono-version-check: line 19: grep: command not found 
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: /Applications/MonoDevelop.app/Contents/MacOS//mono-version-check: line 19: cut: command not found
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: /Applications/MonoDevelop.app/Contents/MacOS//mono-version-check: line 20: cut: command not found
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: /Applications/MonoDevelop.app/Contents/MacOS//mono-version-check: line 21: cut: command not found
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: /Applications/MonoDevelop.app/Contents/MacOS//mono-version-check: line 22: cut: command not found
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: /Applications/MonoDevelop.app/Contents/MacOS//mono-version-check: line 31: osascript: command not found
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: Cannot launch MonoDevelop
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro [0x0-0x56056].com.ximian.monodevelop[1532]: MonoDevelop requires the Mono Framework version 2.10.4 or later.
    May  9 21:34:12 Sri-Vishnu-Totakuras-MacBook-Pro com.apple.launchd.peruser.501[599] ([0x0-0x56056].com.ximian.monodevelop[1532]): Exited with code: 1
    I opened the contents of the application and run the shell script for opening aplication there it worked very fine and application started working.. But if i open application directly through launchpad or finder it doesnt show up and console
    I tried running those commands in the terminal directly there they work.. But dunno whats wrong in here. and even if try to open the application through the terminal it all opens fine.. what could be the possible problem, is it with my mac..?

    i finally figured out the problem.. it is with the environmental variables.  the path for all those commands like "grep" is not being set for the GUI applications.  that is why i got that error. 
    for those GUI applications which require path, we have to set path in the file /etc/launchd.conf  the environmental variables set in here are used by the gui applications and those which are launched through spotlight.
    that file may bot be present in most of the macs. No problem even if not present,we can create one and use.
    so  type in terminal
              $ sudo vi /etc/launchd.conf     
    and in the editor add these lines
              setenv PATH = /new/path
    and save.  Note: replace /new/path with the path which you need to have for the commands used in the script.
    remeber that you need to restart your mac for applications to use these environmental variables.

  • Command not found error in Linux

    Hi all,
    While login into Linux server using terminal i am getting following error.
    -bash: /usr/bin/id: No such file or directory
    -bash: [: =: unary operator expected
    While execute these commands getting following errors
    # clear
    -bash: clear: command not found
    # du -sh *
    -bash: du: command not found
    Help on these issues.
    Linux 32bit OS.
    Red Hat Enterprise Linux Server release 4.0 (Tikanga)

    Likely a flaky environment.
    What is the contents of .bash_profile in your $HOME?
    Any btw, why RHEL4? It is ancient.

  • Error while executing the program  'RBDMIDOC'

    Hi Experts,
    While executing the program  RBDMIDOC
    I am getting the following errors
    One error in Communication data  :
    1)    No data distributed because of conversion errors
    Two errors in Data selection and formatting :
    1)    No ISO code found for the country key NT in the field NATIO
    2)    Conversion error: infotype 0002, object 01,P,00000033
    I am having change pointer entries in BDCP table.
    Can anyone please tell me how to resolve these errors....
    Thanks in advance...

    us the program
    RHALEINI

  • HELP! Installer_Script_Springboard__: line 13: s: command not found ERROR

    got this error in the Installer log while using the upgrading option to Leopard. After that the installation just stalled and did not move. I have tried more than a few times. and same results. Can ANYONE PLEASE HELP ? Below is the error message
    Oct 27 05:48:23 localhost runner150: _Installer_Script_Springboard_163: /Volumes/Reddy`s HD/private/tmp/scripts.VaIV/_Installer_Script_Springboard_: line 13: s: command not found
    Oct 27 05:48:23 localhost runner150: _Installer_Script_Springboard_163:
    Oct 27 05:56:19 localhost Unknown67: 2007-10-27 05:56 Mac OS X Installer143 (CarbonCore.framework) FSEventStreamStart: ERROR: FSEvents_connect() => Unknown service name (1102)
    Oct 27 05:56:21 localhost OSInstaller143: installAutoFSMonitor: open failed

    Hi!
    After 6 hours of experimenting, disconnecting devices, formatting my hard drive (joy!) and getting nowhere, I found the problem: apparently, Leopard has trouble dealing with some characters in the volume name (in my case it was '). Rename the volume to something simple, short and with no weird characters and the Leopard will install.
    And, to Apple: I'm very disappointed with the quality of the Leopard install. If a character is valid in OS X, the setup should support it!
    Best regards,
    IYan

Maybe you are looking for

  • BANK STATEMENT RECONCILIATION INTERFACE

    Hi, I have a requirement to work on 'BANK STATEMENT RECONCILIATION' interface. These are used to reconcile the AP and AR activity through Cash Management module in Oracle Applications. I am very new to this, could you anyone guide me how to proceed.

  • Safari won't complete launch, Virex will not launch

    Running iMac G5 with Panther (10.3) via Wi fi using Airport base Station. Virex will not launch. Safari and IE begin launch then freeze. Able to use Mail and itunes (including Music Store access) as well as "Sherlock". Problem began after another use

  • Problèmes installation Creative suite 5.5 design premium  pour enseignants

    Bonjour, J'ai pu installer la Creative suite 5.5 design premium  pour enseignants, à l'exception de : * Flash Pro CS5.5 * Flash Catalyst CS5.5 * Illustrator CS5.1 Exit code : 7 A savoir que j'ai désactivé mon antivirus et mon pare-feu Quelqu'un peut-

  • Why are LR3.3 and ext hdd not communicating?

    I store all my images on an ext hdd which is synched with LR on my MacBook Pro. A couple of days ago, everything was fine. Just started up ext hdd and opened LR, to be told to 'Click the import button to begin'. Everything in LR is a blank; no recogn

  • MacBook Air 11" for photographer?

    Hey everyone, my name is Brandon Isaiah Garcia & I'm an 18 year old photographer & college student. I am going to purchase a MacBook Air, but I need your help to decide which size I should get! This MacBook Air will be my primary device, because I pl