VERY simple shell script makes me crazy!

I have a two-line shell script to take a snapshot of a virtual machine. The script works and a snapshot is taken with the correct name and description using the vmware-cmd command. But I get an error as if the script tries to run the two parts of the same line.

CODE

#! / bin/sh

"vmware-cmd /vmfs/volumes/Storage1/roadrunner.cooper.local/roadrunner.cooper.local.vmx"_BackupShot_""for snapshot backups"createsnapshot 1 0'.

OUTPUT

#./backup.sh

. / backup.sh: line 3: createsnapshot (_BackupShot_,: command not found)

I'm no expert in shell script, but I don't understand why this error occurs when the command runs perfectly!

Thanks for any help!

I would then use the backtick?

In this case Yes, or you can also use:

variable = $(ligne de commande)

André

Tags: VMware

Similar Questions

  • VERY simple calculation - "Script Failed' unknown value

    Hello people. I'm not new to LCD (I used this product for a period of time to create graphic documents), how ever I am new to use the LCD screen to create documents that make mathematical calculations... This is exactly why I'm having this problem. Sorry grrrrrrr...

    I have a simple document with a few tables/rows. Each line has a value simple condition (if something is checked there is a numeric value), it works fine. What I try to do is just the total value of all the rows in each table, and that the bombs (errors) with "Script Failed (language is formcalc;» context is..) then identifies all the field names as 'unknown '. I'm tempted to test a little differently and I still get this error, in fact I can't get this form to just add to the simple numbers without a similar error.

    Novel I don't know it's me - has been less-than-smart, I didn't belive there is an error with the LCD itself.

    Any direction would be most appreciated. Thank you very much!

    http://www.chnwi.info/test/wellness_scorecard_final.PDF

    Two things:

    1. the sum command has capital S Sum() not sum() is

    (2. There is no space between the sum and the)

    3. When you reference other fields, they are in a different subform that the total amount, so you have to way to the fields. The best way to do this is in the Script Editor, the place the cursor where you want the reference to appear, then hold ctrl and move the cursor over the desired field. The cursor turns into a version V. the mouse when you're on the ground and the correct reference will be written in the script editor.

    4. you can not split the order through two lines... .in all on a single line.

    I have included my modified version. I only did 1 table.

    Paul

  • How to make things very simple...?

    I'm always familiarize myself with the Text Layout Framework methods and Classes.  I looked up how to do two very simple things.

    Someone more familiar with this framework can give me a lead?...

    1. How can I get the text of markup for a TextFlow?  I know how to import text markup - but where is accessible after that?

    2. I can see how to set the focus of selection - but how what I lose?  Unfocus?

    The TextConverter class has an export function.  It converts a TextFlow to either an XML or a string object.

    Containers TLF lose focus when the focus moves elsewhere - in general, this happens automatically.

    See the example for more recent code posted here:

    http://opensource.Adobe.com/wiki/display/tlf/text+layout+framework

    HPE that helps,

    Richard

  • will not appear sql statemnt in shell script

    Hello

    I have a shell script with an unfavourable sql she calls another script where I connect to dabase.

    In the journal of the script, I see the sql statement and I wish that that do not show me anything. How I make these?

    Thank you

    Hello

    2650697 wrote:

    Hello

    I have a shell script with an unfavourable sql she calls another script where I connect to dabase.

    In the journal of the script, I see the sql statement and I wish that that do not show me anything. How I make these?

    Thank you

    Your postal code.  It is very difficult to tell what you're doing wrong without knowing what you are doing.

    You can have SQL statements directly in your shell script.  They must be in a script by themselves, said fubar.sql, and shell script must contain

    @fubar

    instead of real SQL statements.

  • pl/sql to java shell script

    This issue crosses many boundaries, but it begins with PL/SQL, and I hope that there is sufficient expertise here in order to cover the basics.

    System: Oracle 11.2.0.1.0 on Oracle 5, 64 - bit Linux

    I have a PL/SQL, java appeal procedure, which in turn calls a shell script. I put a few diagnostic output in the shell script, the redirection of stdout to a file in / tmp. running the script from the command line works perfectly. When it is called by procedures, no output.

    Here is the 'chain of traceability', somehow...

    In the PL/SQL:
    Host_Command (p_command => v_command||v_control_file||v_orasid);
    where the variable v_command = /opt/u01/app/oracle/admin/control/sqlldr3_test.script


    So this is 'Host_command', the whole procedure procedure:
    CREATE OR REPLACE  PROCEDURE "DW"."HOST_COMMAND" (p_command  IN  
        VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String)';
    And the shell script /opt/u01/app/oracle/admin/control/sqlldr3_test.script:
    #!/bin/ksh
    export trcfle=/tmp/edstest.$$
    export ORACLE_SID=$2
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dwdev
    export PATH=$PATH:/u01/app/oracle/product/11.2.0/dwdev/bin
    export ORACLE_BASE=/u01/app/oracle
    export SQLLDR_CONTROLFILE=$1
    #
    echo input parms are $* >> $trcfle
    echo environment is: >> $trcfle
    env|grep -i ORACLE|grep -v grep|sort >> $trcfle
    #
    exit
    but in the end, there is no /tmp/edstest.* file
    oracle$ ls -ltr /tmp/eds*
    ls: /tmp/eds*: No such file or directory
    oracle$
    open to all ideas.

    I cut things down to their bases, but with the exception of the line of the high level process, the code above is finished... is that my test cut original scripts to exactly what is show. Requriement of business is to take existing scripts and remove some of the stuff that is hard coded, allowing procedures move from dev to qa to prod without hardcoded values unique to each environment.

    I'm very comfortable with PL/SQL and more with shell scripts, but the java link is a black hole for me.

    When the proc of Java runs the external command, a child process of Unix/Linux is created for it. This process inherits the environment settings of the parent process - that would be a dedicated server process, a work process or shared in the pool of the MTS server process.

    These processes have parameters of environment of bare bones and something fundamental that + $PATH + should not be approved as being valid and usable.

    If the Java code should fully qualify the path to the executable file to run.

    Java code should do 2 things - stdout (and stderr if possible) back to the appellant to PL/SQL as vacrhar2 of the parameters out. And return the exit code of the child process.

    They help a lot in troubleshooting why an outgoing external call failed.

    We use these external calls widely enough (through a number of interfaces, treatments to distance running and pulling on the release of data by the latter in the database). All driven from PL/SQL using the proc of Java to make an outgoing call. If the basics are working-, but there seems to be a constant learning and troubleshooting curve to follow to get this working in a robust way.

  • Create SQLNET.ora file throug shell script

    How to create a file sqlnet.ora through Solaris shell script?

    I have a little bit of our 11g databases created by another team without sqlnet.ora files and they are now in production.
    I am looking for a simple way to create a file sqlnet.ora via a solaris shell script and send it in the field to be set up by one of our certification authorities.

    OR

    How to write a simple SQL script to create the sqlnet.ora? Then I can create a shell script to run.

    Any ideas will be appreciated?

    Published by: Albert Zaza October 7, 2010 14:06

    Albert Zaza wrote:

    The spec is a little different from what we have vascular. I need to set up some security configuration as well.

    What kind of security config? It will vary from one facility to the other?

    SQLNET.ora is a very simple text file. I have to agree that you should be able to just build one and then distribute it.

    Maybe I didn't explain well enough.

    The problem is that the work will be done my Solaris System Admin (SA) who go out once a month. He takes with him are preparing with the difference, including work on Oracle and work when the package is installed, the work of the Oracle will be as well.

    So what I want is a syntax used to create the file below and then executed by a shell script when the package is installed by the SA.

    #################################################
    sqlnet.ora # Network Configuration file: $ORACLE_HOME/network/sqlnet.ora
    # Generated by Oracle configuration tools.

    NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
    SQLNET. INBOUND_CONNECT_TIMEOUT = 60
    SQLNET. EXPIRE_TIME = 300

    Ok...

    echo "#################################################"  > $ORACLE_HOME/network/admin/sqlnet.ora
    echo "# sqlnet.ora Network Configuration File: $ORACLE_HOME/network/sqlnet.ora"  >>  $ORACLE_HOME/network/admin/sqlnet.ora
    echo "# Generated by Oracle configuration tools."  >>  $ORACLE_HOME/network/admin/sqlnet.ora
    echo ""  >>  $ORACLE_HOME/network/admin/sqlnet.ora
    echo "NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)"  >>  $ORACLE_HOME/network/admin/sqlnet.ora
    echo "SQLNET.INBOUND_CONNECT_TIMEOUT=60"  >>  $ORACLE_HOME/network/admin/sqlnet.ora
    echo "SQLNET.EXPIRE_TIME=300"  >>  $ORACLE_HOME/network/admin/sqlnet.ora
    

    or just to have a copy of the sqlnet.ora and

    cp $source_dir/sqlnet.ora $ORACLE_HOME/network/admin/sqlnet.ora
    

    Published by: EdStevens on October 8, 2010 11:33

  • shell script for oracle alert.log file

    Hi gurus,

    I want to write the shell script to know the last timing 10 stop of the database of the alerts log file. I'm working on oracle 9i.

    Could someone please advice on that.

    Thanks in advance

    Kind regards
    Shaan

    Published by: Shaan_dmp on January 5, 2009 13:27

    Published by: Shaan_dmp on January 5, 2009 13:28

    Use awk. I have not at hand a 9i but here is a very simple version for 10g XE

    My awk file (line numbers for the notes below - don't include them):

    01:BEGIN { prevline = "";} 02:03:/Completed: alter database close/ {print prevline,FS,$0;}04:05:{prevline = $0;}
    

    The command line and the results (from my alert log 300 k)

    $ awk -f alert.awk.txt alert_xe.logFri Apr 11 18:08:40 2008   Completed: alter database close normalFri May 16 18:53:21 2008   Completed: alter database close normalTue May 20 17:28:23 2008   Completed: alter database close normalThu Jul 17 19:08:52 2008   Completed: alter database close normalFri Aug 15 15:12:48 2008   Completed: alter database close normalWed Nov 05 08:52:59 2008   Completed: alter database close normalFri Nov 14 16:36:03 2008   Completed: alter database close normalTue Dec 09 10:46:23 2008   Completed: alter database close normalMon Jan 05 11:12:22 2009   Completed: alter database close normal
    

    What it means:

    (1) section START line 01 defines the variable to contain the previous line
    (2) the /search chain / line 03 search marker in the file for a stop, and then performs the requested action (print the time that was in the previous line and then this line; use FS (the field to the awk - space normally separator) as a separator
    (3) on line 05 is a statement that we do on each line - is remembered in case it is the timestamp for the closure.

    Now, you can include several cases corner for closures by adding several models of research etc. For more information, google for examples of awk.

    AWK is really good at this sort of thing!

    HTH

    Nigel cordially

  • Very simple question and CVI-program

    Hello

    I just started working with CVI, and as far as I can see, the principle underlying the interaction between various components is similar as in Delphi. I made a very simple example (Application of User Interface), containing a square button and a digital. My idea was to push the button, after which the DIGITAL controller displays a number. However, I can't figure out how to build a change of the function that is executed when you press the button. I tried a double click, right click, etc, but I couldn't understand it. I hope my question makes sense.

    Have you had a look in Chapter 2 of the getting started manual?

  • I need a very simple database system. I am the end user to allend users!

    Original title: database access

    I need a very simple database system. I am the end user to allend users!

    Access is rather dated, but could probably manage it if you own and that you already have a model for what you need.  Just open it and see if all the default options are what you are looking for, and it will put you in automatically:

    If this is not the case, just tell us what your needs are and I'm sure we can make a suggestion

  • CDF to run commands / Shell scripts

    Hi friends,

    I need help serious here regarding the CDF function.

    I created a JAR file to run batch/shell scripts via the calculation script.

    I tested the JAR file and it works perfectly well that run without the calculation script, but I get errors including in Calc script, I get the error message.

    Initially, the error was: error of Machine virtual Java and later, it is class not found.

    Here are the steps to register the CDF:

    1. place the JAR file in the location: E:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer\java\udf\

    2. update the file udf.policy with the following statement:

    Grants all permissions to BatEx

    give the code "file:${essbase.java.home}/BatEx.jar" {}

    permission java.security.AllPermission;

    };

    3 restart the Essbase services.

    4. I am trying to create this function at Global level so no mention is not the name of the Application in the MaxL at registration:

    create or replace function '@BatEx' as

    "BatEx.

    Spec '@BatEx(Complete path in double quotes) '.

    Comment "Functions A CDF that runs the batch file in Essbase Server";

    5 this is the calc script:

    @BatEx 'E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat '; -It gives an error: error: invalid syntax 1012000 - not a command CALC [@BatEx]

    I tried another way:

    RUNJAVA @BatEx 'E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat '; -Gives an error: problem running [@BatEx 'E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat']: [can't find @BatEx class]

    Where I am wrong here? Please help me out here.

    Kind regards

    RB

    Thanks much Amit and Jake! I finally cracked!

    Sad thing is that I have found no OTN correct information regarding function Java Custom, rather there was a lot of information about CDFs pre-existing provided by Oracle, so I decided to write a complete solution of CDF, where Java code too was created by the developer of Essbase applications.

    The requirement that I had was to trigger the batch file in the calculation script. Here is the detailed requirement:

    Update Variable of Substitution by planning web form.

    1. the user enters the data in the form of the planning web and saves it.

    2. the calc script attached to the web form, extracts data and records the flat file on Essbase server.

    3. earlier we were executing the script batch on the web server as the workflow will identify the lots on the web server and not on Essbase server, but after the development of this CDF to run the batch job, the batch files can be run directly Essbase server.

    4. the idea is to keep the user limited to the tasks list, so that it does not jump to the to-do list to SubVar web form, workflow and then return to the task list for a simple job to change SubVar.

    There were a few challenges that I encountered during the development of this JAVA function, namely:

    1 function CDF records do not : I tested JAVA code separately using command line and the executable Jar file will execute the batch, as expected. But I couldn't get why my CDF is not have recorded trace. After a lot of searching on Google and analysis, I found that it was the difference between the Version of JAVA (the JAVA compiler I used to compile and create my JAR file) and JAVA (JVM Essbase) virtual machine. I used JDK 1.7 update 65 to compile and create my POT so that the JVM used in the Essbase Server Update 1.6 is 35. I uninstalled JDK 1.7 of my machine, downloaded Update 1.6 35 archives of the Oracle and recompiled the code. Guess what! My CDF function was recorded first.

    So always check the compatibility of the Version of the JDK you used to compile and create the JAR file and JVM on your Essbase server.

    You can check the version of the JVM in console EAS-> EssbaseCluster-> right click-> Edit-> properties-> tab environment. There is a line that appears something like:

    ; JvmModuleLocation $J (EPM_ORACLE_HOME)-...-jdk160_35\jre\bin\server\jvm.dll (the bold is your version of the JVM).

    2. "main class not found" error after successful registration of CDF:

    I haven't had that one category of Public in my JAVA code and this error took me by surprise. I also checked the "public static void main" section in my code and everything seems to be OK. Please note that JAVA is case sensitive - 'hand' and 'Hand' aren't even in JAVA.

    I did some further research and one of John's response to a CDF request, I came to know that I need to include another argument (context) in the main section of my Java code and recompile with classpath "essbase.jar" (I will explain the controls in the next steps). I changed the main section of my JAVA code and included the argument:

    Public Shared Sub main (paramContext context, String [] paramArrayOfString)

    The following JAVA code to perform the batch in Essbase Server:

    import com.hyperion.essbase.calculator.Context;

    import java.io.BufferedReader;

    import java.io.InputStream;

    import java.io.InputStreamReader;

    import java.io.OutputStream;

    import java.io.PrintStream;

    public class BatEx

    {

    Public Shared Sub main (context, paramContext, String [] paramArrayOfString)

    {

    Try

    {

    String str1 = paramArrayOfString [0];

    LocalProcess process = Runtime.getRuntime () .exec (str1);

    InputStream localInputStream1 = localProcess.getInputStream ();

    OutputStream localOutputStream = localProcess.getOutputStream ();

    InputStream localInputStream2 = localProcess.getErrorStream ();

    BufferedReader in = new BufferedReader (new InputStreamReader (localInputStream1)) localBufferedReader;

    String str2;

    While ((str2 = localBufferedReader.readLine ())! = null) {}

    System.out.println (str2);

    }

    System.out.println ("package executed successfully.");

    }

    catch (Exception localException)

    {

    System.out.println ("error!:" + localException);

    localException.printStackTrace ();

    }

    }

    }

    Install the (compatible to Essbase JVM) compatible version of the JDK on your machine. Compile the above code by using the following command:

    C:\ >javac - classpath essbase.jar BatEx.java - please specify the path to the file "essbase.jar". It generally to the location: : \Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer\java\

    The code should compile without any problem, and a .class file must be created with the same name.

    Now is the time to create the JAR file. Use the following command:

    C:\ >jar cf BatEx.jar BatEx.class

    Now the executable JAR file must also be created.

    Place this JAR file: : \Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer\java\udf\

    Restart the service of Essbase and application (the only Application Restarting should work, but I didn't take any chances to restart both).

    Check the log of function CDF recording applications. The application log should be at the location:

    : \Oracle\Middleware\user_projects\epmsystem3\diagnostics\logs\essbase\essbase\app\-

    The CDF enrollment message should be something like:

    External function of [GLOBAL] [@BatEx] saved OK

    I used the following MaxL to register my function in Essbase:

    create or replace function '@BatEx' as

    "BatEx.

    Spec '@BatEx (StringArray).

    Comment "Functions A CDF that runs the batch file in Essbase Server"

    I used the following script to calc to run my CDF (fairly simple however):

    ESS_LOCALE English_UnitedStates.Latin1@Binary

    RUNJAVA BatEx "": / Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat ";" -Note: please replace with the name of the physical drive.

    I went and checked the logs that the Test.bat written and "wallah! The log file had some content and 1 KB in size. I deleted the contents of the log file and checked again, the result was the same.

    Hope this answer helps all of us who work on CDF that is clean.

    Please like this post if this can help you in some way.

    Thanks again to Amit, Jake and John for helping me solve this puzzle.

    Kind regards

    Amit Kumar Singh

  • Symlink for Shell Script in concurrent programs

    Hi all

    Suppose we have a simultaneous program to host type. Now, we need to make changes in the Shell Script for the new requirement.

    Kindly asking you to confirm if we need to create the symbolic link .prog new file or existing link will work perfectly.

    Kind regards

    Amit

    Hi Amit,

    You do not have to re - create the soft link will work perfectly. I've tested and works.

    Kind regards

    Neeraj.

  • How can I add two very simple Questions to a slide?

    Hello

    I would like to be able to add two very simple questions to a slide, but don't know if (or how) this can be achieved. I've explained this more in detail below:

    ====================================================================================

    Scenario of

    The slide must contain two questions:

    Question 1: with two check boxes for the options Yes and No

    Question 2: with five check boxes for options 1 2 3 4 and 5

    A button (for example named Submit) to verify the responses from users by triggering a tip Action that verifies the radio buttons that have been selected.

    ====================================================================================

    The checkbox Widget looks like it could work for this scenario, because it allows each value to be assigned to a variable. However, when you try to put in place the tip Action I couldn't see all the variables I named in the checkbox Widget.


    If anyone has done this kind of thing before and can offer advice on the best way to create custom questions, I'd appreciate any help.


    For reference, I use 8 Captivate.


    Thank you


    Ross

    I indeed used interactions of checkboxes or radio buttons many times for this kind of slides. That's why I'm confused and I first want to know if you want an answer to the second issue as well? For the first question, it is clear that you need an interaction of option buttons, I don't know if you want to allow more than one choice for the second question. Only when you need to allow more than a choice will you have the interaction of check boxes, in the other scenario, option buttons will do the trick. It makes a big difference, because the radio button widget has only one associated variable that will store the selected element. For the widget checkboxes, you need a variable for each choice.

    Maybe my blog could help clarify, you can also download a descriptive table with all interactions of CP8 training

    Advice - Training interaction - Captivate blog

    BTW, I moved this thread to the Quizzing subspace.

  • Need help very simple drawing spiral overlapping

    I'm surprised that it is difficult to search for on this form. It's a whirlwind, but it is much simpler than the ones you find on a Google search. I'm just trying to draw a very simple line representing almost in a schematic way, a whisp of smoke. Very easy to make a clumsy with the pencil. But I would like a no clumsy. My deep gratitude to all those who can show me why the solution is obvious and I'm just a dope.

    Rob

    smokeSpiral.png

    Hey Rob! Thanks for reaching out. Here is a link to a similar post which can be useful... I think that post #2 will be your best bet.

    Let me know if it helps!

    -Kathleen

  • Get PLSQL stored procedure in unix shell script

    Hi Experts,

    I have a PLsql procedure with the specification below-

    PROCEDURE SEND_INV_VIA_EMAIL (p_pdf_file_name IN VARCHAR2, p_submitted_frm IN VARCHAR2);

    I can pass two parameters of SHELL script and it works fine-

    # By calling the PLSQL procedure

    sqlplus-s $APPS_USER < < EOSQL

    SET SERVEROUTPUT SIZE 1000000

    whenever sqlerror exit 1;

    run MOB_XMLPUB_ARCHIVE_ARINV_PCK.send_inv_via_email ("basename $DATA_FILE", "ARCHIVE");

    "exit";

    EOSQL

    But now I want to have an output in the plsql procedure parameter-

    PROCEDURE SEND_INV_VIA_EMAIL (p_pdf_file_name IN VARCHAR2, p_submitted_frm IN VARCHAR2, p_return_status IN OUT VARCHAR2);

    based on this I want to determine the concurrent request completion status since the shell script is called via the simultaneous program.

    How will pass parameter out of the shell and how do I use this parameter in the SHELL script to determine completion status?

    Thank you very much.

    Vikrant

    Something like this:

    # By calling the PLSQL procedure
    sqlplus-s $APPS_USER<>
    SET SERVEROUTPUT SIZE 1000000
    whenever sqlerror exit 1;
    declare
    rstatus varchar2 (100) - or however long, it must be
    Start
    MOB_XMLPUB_ARCHIVE_ARINV_PCK.send_inv_via_email ("basename $DATA_FILE", 'ARCHIVE', rstatus);
    dbms_output.put_line (' status = ' | rstatus);
    end;
    /
    "exit";
    EOSQL
    grep 'Return status =' somefile

  • Query does not not in shell scripts

    Hi Experts,

    I created a query to check the temp tablespace use in production servers and I wanted to run the query using shell scripts, but when I run the query in the script I get no error or output I am unale to correct where exactly, I make the mistake

    This is the query

    SELECT A.tablespace_name 'space', D.gb_total, ROUND (SUM (A.used_blocks * D.block_size) / 1024 / 1024/1024,2) "gb_used", ROUND (D.gb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024/1024,2) 'gb_free' v$ \sort_segment A, (SELECT B.name, C.block_size, ROUND(SUM (C.bytes) / 1024 / 1024/1024,2) 'gb_total' v$ \tablespace B, v$ \tempfile C WHERE B.ts #= C.ts # GROUP BY B.name, C.block_size) D WHERE A.tablespace_name = D.name GROUP by A.tablespace_name D.gb_total

    You can help in this.

    Thank you...

    Basic Linux/Unix shell script format

    #! / bin/sh

    oracle set environment #.

    Export ORACLE_HOME =...

    export of SID =... or TWO_TASK = export

    .. etc.

    # launch sqlplus

    sqlplus-s/nolog<>

    Connect scott/tiger

    together... environment of sqlplus

    -execution of script sql (or sql query)

    @script.sql

    output

    EXPRESSIONS OF FOLKLORE

    #end script

    Character $ is interpreted by the shell as environment variables, you must escape the $ character is as well as it not assimilated to the variable approx.

    For example, v$ instance should be written as v$ instance.

Maybe you are looking for