Simple shell script problem...

I am trying to get a list of directories on a remote machine, compare them with the directories on the local machine and copy any that dont match on the local machine to a backup folder. Heres my code but i am a newbie and i cant get my shell script to read from a file. The for loop never executes so i am guessing i am not reading the file correctly - see below.
#!/bin/ksh
ssh -l removeserver 192.168.xxx.xxx ls /remote/server/directory/ > /store/remote/directory/listing/motapp1files.txt
newfile=''
$newfile < /store/remote/directory/listing/motapp1files.txt
for file in $newfile;
do echo $file
if [ ! -d local/machine/directories/$file/ ]; then
echo "this folder doesnt exist on on remote server "; echo $file;
fi
done

Re-inventing the wheel perhaps. Look into rsync. Great program!
I used it in FreeBSD to do a very similar task.

Similar Messages

  • Running a simple shell script

    Not being a regular user of terminal on OSX, I have managed to forget how to run a simple shell script. The purpose of the script is to rename a set of files contained in a specific directory. Here is a sample of the script I wrote some time back:
    mv product_22.jpg 080688614423.jpg
    This command repeats for each file I need to rename. My recollection is that I simply put the actual script text file in the same directory as the images to be renamed and drag the script file into a new terminal window and hit enter to run. When I try this however I receive the following error:
    ord2: Permission denied
    Can anyone help me out here? I'm running 10.2.8. I seem to beforgetting a critical step somewhere along the way.
    Thanks
      Mac OS X (10.2.x)  

    Have you set the execution bit for the script? When not, use: chmod 755 script.

  • Creating simple shell script packages to deploy with ARD and TaskServer

    I am looking for a simple step by step on how to create a package that can be deployed using ARD, to run a simple shell script like
    "softwareupdate -i -a"
    A brief search here returned nothing, but perhaps I was not using the correct terms.
    Ultimately, I want to use ARD to run software update on ~400 Macs.
    Thanks in advance for your help.
    Bill

    If I send it as a unix command, it will run only on machines that are currently awake and responding to ARD.
    If I can set it up as a package, then I can use Task Server to "deploy" the command to machines that are not currently online. When the machines next contact the Task Server, they will be told to run softwareupdate.

  • Do shell script problem in Applescript

    Hi,
    I am an Applescript novice and have been trying to write a code to go to a particular folder, look for all files in the folder tree with extension .m2v and run an executable file to decode them. My problem is that when I run my code (containing do shell script), it searches through all files and folders on Mac HD and starts decoding .m2v files elsewhere that I don't want.
    Eventually it runs out of space (.m2v file decoding takes a lot of space), because it is dumping all decoded .yuv files onto the HD.
    When I run the command on Terminal, it executes the decoding perfectly and stores the decoded files in the same folder.
    Please help me about what's going on.
    My code is something like:
    tell application "Finder"
    set DestinationFolder to "xxxxxx:xxxx:xxxx"
    set NumFolders to (get count of folders under Destination folder)
    repeat for SomeVar from 1 to NumFolders
    set FolderinQuestion to folder SomeVar of DestinationFolder
    -- Tried tell application "Terminal" here, but did not know --how to export the FolderinQuestion variable from Finder to --Terminal
    do shell script " \" cd \" & (POSIX path of (result as text));
    for file in `find $pwd \"*.mov\"`
    do
    /usr/local/bin/decode file
    done"
    end repeat
    end tell
    I would greatly appreciate some guidance.

    The root of the problem is that you're trying to quote the cd command for some reason:
    <pre class=command>do shell script " \" cd \" & (POSIX path of (result as text));
    ...</pre>
    In addition to that you're including the & (POSIX path of (result as text)) as part of the shell command whereas this should be OUTSIDE of the quotes in order to get evaluated
    If you work that through you'll end up with a shell command that looks like:
    <pre class=command>" cd " & (POSIX path of (result as text))</pre>
    If you try to run that in a terminal you'll get a cd : command not found error and that's why the rest of it appears to fail.
    The solution to that one is simple - just don't bother quoting the cd and put the POSIX path stuff outside of the quotes to get it evaluated at runtime:
    <pre class=command>do shell script "cd " & quoted form of POSIX path of (FolderInQuestion as text)) & ";
    # rest of shell commands here"</pre>
    Now, as for the rest of the script there are a few things I would change.
    First, unless you need to know the index, don't do:
    >repeat for SomeVar from 1 to NumFolders
    set FolderinQuestion to folder SomeVar of DestinationFolder
    the issue is that the number of folders to process may change during the script's execution (other processes may create or remove folders). This will, at best, cause some folders to be skipped and, at worst, cause the script to fail.
    If you're iterating through a list, the best option is to just:
    <pre class=command>repeat with FolderInQuestion in (folders of DestinationFolder)
    ...</pre>
    This automatically sets the iterator (in this case, FolderInQuestion, to the first item in the list and increments it for each iteration through the loop.
    Secondly, in your shell script itself, scrub the entire do/done loop. You're already using find, so have that do the hard work using the -exec switch:
    <pre class=command>find path -name "*.mov" -exec /usr/local/bin/decode {} \;</pre>
    In find's case, {} is substituted with the current file's path.
    Putting this together you'd get:
    <pre class=command>tell application "Finder"
    set DestinationFolder to "xxxxxx:xxxx:xxxx"
    repeat with folderInQuestion in (get folders of folder DestinationFolder)
    do shell script "cd " & quoted form of POSIX path of folderInQuestion & "; find . -name \"*.mov\" -exec /usr/bin/decode {} \\;"
    end repeat
    end tell</pre>
    Note that I've used 'quoted form of POSIX path' - this takes care of any shell-unsafe characters like spaces in the path name. I've also used \\; for the -exec switch - this is so that AppleScript passes the \ to the shell command rather than using it for its own escaping.
    But you're not done yet!
    There's still one fatal flaw in this process - and that is the fact that find by default, is recursive - it will walk through every directory that it finds.
    This means that if you start at the top folder and iterate through, find will find all .mov files and decode them. Your script then cd's to the first subdirectory and repeats the process - decoding all the .mov files in that directory and all its subdirectories even though they've ALREADY been decoded.
    The upshot is that you only need to run one loop starting at the top level. You don't need to iterate through all the subdirectories since find will do that for you.
    In addition to that, there might not be a need to use cd at all since the first argument to find is the directory to start searching in. Unless there's some reason that you need to start decode from the top level directory (e.g. is that where it saves the files?), you can drop the whole repeat loop altogether and just run with:
    <pre class=command>set startFolder to (choose folder)
    do shell script "find " & quoted form of posix path of startFolder & " -name \"*.mov\" -exec /usr/bin/decode {} \\;"</pre>
    That's the entire script - a radical compression of your original.

  • Simple Shell Script Question.... [java related]

    Hey guys! This is my first post, as im new here :S
    I have a simple problem for a big program.
    We have a .sh to install it, but when I run the .sh in terminal like i should, It says the class is not found. I believe it has to do with the syntax, as the person who made it is not a linux pro. I don't know MUCH about shell scripts, but I'm pretty sure I know where the error lies.
    Our Script:
    java -classpath ./:./jars/tools.jar:./jars/nexus.jar impsoft.nexus.installer.Install
    chmod a+x run.sh compile.sh
    The Error:
    Exception in thread "main" java.lang.NoClassDefFoundError: impsoft/nexus/installer/Install
    What I think the problem is:
    ./jars/nexus.jar impsoft.nexus.installer.Install
    Thank you for ALL of your help!

    Hi Justin,
    Have you tried running the lines from the command line?
    The second thing you may want to try is changing the relative directory for the jar file from a relative one to a fixed directory. From the error, it appears that the install program is running but it is not able to locate a library mentioned in the program (which is probably the jar file listed in the classpath).
    Hope that helps.
    J. Haynes
    Denver

  • Simple shell script utility to copy abs tree for build

    Hi,
        I'm learning shell script and decided to make a simple script to copy the folder i want from /var/abs to
        a new folder so i can build the package. here it is: (remember, i'm new to shell scripting, if you know a better way to do it, you can modify my script
        and post here a better solution, so, i (and others) can learn with my errors)
    #!/bin/bash
    #Looks for the abs tree of the software you want
    #and copy it to your build path
    ABSTREE=/var/abs
    echo -n "What software do you want? "
    read absname
    result=$(find $ABSTREE -name $absname)
    for i in $result; do
    echo -n "$i, is this what you want? [y/n] "
    read opt
    if [ $opt = "y" ]; then
    echo -n "Copy to... "
    read buildpath
    relative=${i#$ABSTREE}
    absolute=$buildpath${relative%$absname}
    mkdir -p $absolute
    cp -r $i $absolute
    echo "$i successfully copied to $absolute"
    exit 0
    fi
    done
    exit 1

    spoonman wrote: mkdir -p $absolute
    cp -r $i $absolute
    echo "$i successfully copied to $absolute"
    You are assuming `mkdir` and `cp` were successful. You should test them to make sure, and exit with failure if not:
    mkdir -p $absolute || exit 1
    cp -r $i $absolute || exit 1
    echo "$i successfully copied to $absolute"
    You could also include your own error message, but mkdir and cp would throw their own if something fails...
    mkdir -p $absolute || { echo "mkdir failed"; exit 1; }
    cp -r $i $absolute || { echo "cp failed"; exit 1; }
    echo "$i successfully copied to $absolute"
    Another way is to use `set -e` which will exit the script on any failure without explicit testing:
    set -e
    mkdir -p $absolute
    cp -r $i $absolute
    set +e
    echo "$i successfully copied to $absolute"

  • Executing native library under Java - shell script problem

    I am running a Java application on the command line bash shell. I have a few JAR files in the directory and a few native libraries. When I run the application using the command line, all works fine. This is the command I use:
    java -classpath MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainThis works fine and the application starts up as expected. LWJGL native library is loaded in and works fine as expected.
    The problem occurs when I try to run this command via the shell using a shell script. Here is my script:
    #!/bin/bash
    # Set the minimum and maximum heap sizes
    MINIMUM_HEAP_SIZE=768m
    MAXIMUM_HEAP_SIZE=1024m
    if [ "$MYAPP_JAVA_HOME" = "" ] ; then
        MYAPP_JAVA_HOME=$JAVA_HOME
    fi
    _JAVA_EXEC="java"
    if [ "$MYAPP_JAVA_HOME" != "" ] ; then
        _TMP="$MYAPP_JAVA_HOME/bin/java"
        if [ -f "$_TMP" ] ; then
            if [ -x "$_TMP" ] ; then
                _JAVA_EXEC="$_TMP"
            else
                echo "Warning: $_TMP is not executable"
            fi
        else
            echo "Warning: $_TMP does not exist"
        fi
    fi
    if ! which "$_JAVA_EXEC" >/dev/null ; then
        echo "Error: No Java environment found"
        exit 1
    fi
    _MYAPP_CLASSPATH="MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar"
    _VM_PROPERTIES="-Djava.library.path=\'lwjgl/native/linux\'"
    _MYAPP_MAIN_CLASS="com.mygame.Main"
    $_JAVA_EXEC -classpath $_MYAPP_CLASSPATH $_VM_PROPERTIES -Xmx${MAXIMUM_HEAP_SIZE} -Xms${MINIMUM_HEAP_SIZE} -ea $_MYAPP_MAIN_CLASSThe shell script is in the same directory as the JAR files (the same directory where I ran the Java command above). When I execute the shell script ( sh MyGame.sh ), I get the UnsatisfiedLinkError message:
        14-Feb-2011 19:46:28 com.wcg.game.DefaultUncaughtExceptionHandler uncaughtException
        SEVERE: Main game loop broken by uncaught exception
        java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
           at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
           at java.lang.Runtime.loadLibrary0(Runtime.java:823)
           at java.lang.System.loadLibrary(System.java:1028)
           at org.lwjgl.Sys$1.run(Sys.java:73)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
           at org.lwjgl.Sys.loadLibrary(Sys.java:82)
           at org.lwjgl.Sys.<clinit>(Sys.java:99)
           at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
           at com.jme.system.lwjgl.LWJGLDisplaySystem.setTitle(LWJGLDisplaySystem.java:118)
           at com.wcg.game.WcgStandardGame.initSystem(WcgStandardGame.java:287)
           at com.wcg.game.WcgStandardGame.run(WcgStandardGame.java:185)
           at java.lang.Thread.run(Thread.java:662)I don't understand what I am doing wrong. I am executing the exact same command via a shell script and it is not working. Any ideas, solutions, most welcome.
    I am running Linux Mint Debian 201012, Linux mint 2.6.32-5-amd64 #1 SMP Thu Nov 25 18:02:11 UTC 2010 x86_64 GNU/Linux. JDK is 1.6.0_22 64-bit. I have 64-bit .so files in the correct place too.
    Thanks
    Riz

    Thanks for the replies guys/gals.
    I have modified the script and echoed my command that should be running under the shell script, it is:
    java -classpath WcgFramework.jar:WcgPocSwordplay.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainI am more confident that now the shell script should be fine (I am a shell script noob) because this very command if I copy from terminal and paste into the terminal, runs the application no problem at all. But I am amazed that it is still not working. I must be doing something obviously wrong. :-(
    I used the code as suggested:
    _VM_PROPERTIES='-Djava.library.path="lwjgl/native/linux"'I am stumped!? :-(
    Thanks for help.

  • Ananomous block inside shell script problem

    I am having problem using / inside the anonymous block...
    I have a shell script which is somethinglike this.
    $ORACLE_HOME/bin/sqlplus -s << EOF
    --set head off;
    --set feedback off;
    set serverout on;
    Cursor c1 is
    select --------
    Begin
    for x in c1 loop
        Begin
          <do something>
        End;
    End Loop;
    End;
    End;
    EOF
    mail -s -----If i don't use / certian things are not executed.
    If i use exit instead of /, then it will not reach the end ie., the mail part.
    can somebody guide me ??

    sb92075 wrote:
    sunil_dba wrote:
    I am having problem using / inside the anonymous block...anonymous blocks begin with
    DECLARE
    which posted code seems to be lackingOr also a BEGIN if no variables, constants or user types are declared.

  • Simple shell script issue

    Hi,
    I have an issue with following shell script:
    #!/bin/sh
    env | while read VAR; do
    RIGA=$RIGA"\""$VAR"\";"
    done
    echo $VAR
    echo $RIGA
    exit 0
    Why the last echo commands (echo $VAR and echo $RIGA) don't give me any result? Why $VAR and $RIGA are empty?

    From what I understand, anything to the right of a pipe is run in a sub-process in non POSIX shells, which runs in it's own environment. Variables changed inside ta sub-shell are not changed at the parent process.
    Perhaps using ksh instead of bourne shell will work, or you could try input redirection rather than using pipe command. e.g.:
    while read VAR; do
    RIGA=$RIGA"\""$VAR"\";"
    done < $(env)
    echo $VAR
    echo $RIGA
    exit 0
    Edited by: Dude on Dec 15, 2010 6:11 AM

  • Sqlldr ops$user/password in a shell script - problem

    Hello All:
    i run the sqlldr command from a unix shell script that has
    sqlldr ops$user/password@alias control='/path1/control.ctl' log='/path2/log.log'
    I am geeting invalid user/password because of the $ sign in the username. What is the workaround for this? How to handle this in the script?
    I tried single quote, USERID= unsuccessfully. Any ideas?
    Thanks
    San~

    Hello,
    Single quote should work fine , can you post your shell script specially couple of line and try connecting from command line.
    $ sqlplus 'test$user'/*****
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 14 14:36:04 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine optionsRegards
    Edited by: OrionNet on Apr 14, 2009 2:38 PM

  • How to use the result of simple shell script?

    The shell script below retrieves the length of an audio file:
    set aFile to choose file
    do shell script "afinfo " & quoted form of (POSIX path of aFile) & "|grep duration"
    I'm wondering, how can I copy the result to the clipboard or set the value of a variable to it?
    Total newbie question. I have no idea about shell scripts - I just found the script above online.
    Thank you so much!

    Here:
    set the clipboard to (do shell script "afinfo " & quoted form of (POSIX path of aFile) & "|grep duration")
    or:
    set A to do shell script "afinfo " & quoted form of (POSIX path of aFile) & "|grep duration"
    (53997)

  • Rman shell script problem

    Hello,
    While running the following rman commands directly from the shell , its work fine :
    $ rman CATALOG=catman/man@rman TARGET=/
    RMAN> run {
    2>   allocate channel 'dev_1' type 'sbt_tape'
    3>   parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
    4>   allocate channel 'dev_2' type 'sbt_tape'
    5>   parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
    6>   restore archivelog from time "to_date('2011-02-14 08:31:55','YYYY-MM-DD HH24:MI:SS')" until time 'SYSDATE';
    7>     }
    allocated channel: dev_1
    channel dev_1: sid=323 devtype=SBT_TAPE
    channel dev_1: Data Protector A.06.11/243
    allocated channel: dev_2
    channel dev_2: sid=438 devtype=SBT_TAPE
    channel dev_2: Data Protector A.06.11/243
    Starting restore at 2011-02-14 19:01:38
    ....When trying to run it as shell script :
    #!/bin/ksh
    ssh -l oracle 172.22.xx.xx . /software/oracle/.profile ;
    export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
    rman CATALOG=catman/man@rman TARGET=/
    run {
       allocate channel 'dev_1' type 'sbt_tape'
       parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
       allocate channel 'dev_2' type 'sbt_tape'
       parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
       restore archivelog from time "to_date('2011-02-14 08:31:55','YYYY-MM-DD HH24:MI:SS')" until time 'SYSDATE';
       }The script succeded to connect to rman but it stuck hir:
    $ ./yoav.sh  
    Recovery Manager: Release 10.2.0.4.0 - Production on Mon Feb 14 20:13:41 2011
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: BZ (DBID=3044220964)
    connected to recovery catalog database
    RMAN> Any suggestion why it stuck ?
    Thanks

    It is stucked because RMAN it waiting input on STDIN and you don't give anything as input to STDIN.
    Try to use
    $ rman CATALOG=catman/man@rman TARGET=/ <<EOF
    <your RMAN script>
    EOFor try to use RMAN command file like a SQL file:
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/setup001.htm#sthref206
    Edited by: P. Forstmann on 14 févr. 2011 20:05

  • Create a simple shell script thing?

    Hey,
    I'm trying to make a simple command script thing. I have no idea what I'm doing though.
    I just want a file that I can click and open in terminal that will:
    1. ssh [email protected]
    2. auto enter the password (if this is really complicated then it can be skipped)
    3. cd public_html/blog
    4. svn up
    5. like 5 sec delayed exit (if possible)
    I'm thinking this is a really easy thing to do for someone who knows what they're doing.
    So can someone tell me what I have to do to make this? I would really like to learn how to do this.
    Thank you
    Last edited by FLCLFan (2008-10-12 20:06:20)

    Instead of making a script, you could just as well write a bash function for this and put it in your .bashrc.
    something like this:
    update-svn-on-domain ()
    ssh -t [email protected] 'svn up public_html/blog'
    when the svn up is done, the ssh command stops, and the function returns.  it does everything you want except auto entering passwords. 
    i strongly discourage auto entering passwords.  i recommend you to setup rsa key authentication

  • Simple Shell Script To Add To Default Path?

    I know that this question will at first appear idiotic,but here goes.
    I'm logged into a Solaris 9 shell as 'root'. I echo $PATH and see a couple of default paths. I want to add to that PATH - this can easily be done from the command line as follows:
    PATH=$PATH:/some/other/path
    export PATH
    So, naturally, I'd like to throw this into a simple script, and when I do so, and run the script called 'hello'. So, I run 'hello' as follows:
    ksh hello (I'm a kshell)
    Result: no errors. Then, I check my PATH as follows:
    echo $PATH
    And nothing changes, it's still the same PATH!
    Can anyone tell me how to do this?
    Appreciate your response.
    dedham_ma_man

    The question shows you don't really understand how shells work.
    The path is part of the environment of your current shell.
    Any command you "execute" is run in a new process. And any changes made to the environment of that process cannot effect the environment of the parent process (ie your shell).
    So by saying "ksh hello" your starting a new shell and changing the path in that shell. But when that shells exits and your back in the original shell, of course nothing has changed.
    So the answer is that what you have to do is not "run" the script. But persuade your current shell to execute in its own context.
    In a C shell that would be done by the "source" command. And in a bourne shell, its the "." command. But I'm not sure how you do it in korn shell.

  • Simple shell script to create linkedClones on stand alone ESXi host.

    Hey Guys,
    Last few days I have been working on creating linkedClones in bulk for some of the testing purpose. Since I did not had my vCenter up and running so I spend few minutes to write a simple script to create a linkClones on standalone ESX host.
    My script create full clone of given VM, then creates snapshot on it and starts creating linkedClones from the delta vmdk files (it just create new directory for linkedClone VM's and copies those delta files to new location and then point it to base disk, nothing magic here ).
    Now this script is working perfectly fine for me, and I can power on all the VM's which is pointing to base disk. Later I tried creating linkedClones using vCenter API's as well which seems to be doing the similar thing.
    So I just want to check with you guys if my script is Ok or thats not the way to do it (this may be unsupported way of creating linkedClones but I just want a way to create linkedClones on standalone esxi host as I may not have vCenter server available everytime) ?

    Hi!
    As long as your softsynths comes in the VSTi format (most of them do now), you can insert it on a track in Audition, which has 'host' capabilities from V3.
    In the Multitrack, insert a new MIDI track from the 'Insert' menu (note: MIDI Track, not just 'MIDI').
    On that track pane hit the 'Sequencer' button, and it will open in a separate window. In the pane left of the keyboard you can insert your VSTi of choice, and make your MIDI connections.
    Back on the Main track pane, engage the 'L' button for Live monitoring. Actual recording (of MIDI) is done in the Sequencer window.
    The usual, and recommended workflow is to keep the MIDI tracks 'open', i.e. you can edit the sound in your instrument and even the notes played at any time in the process, compiling the actual audio as the last step in the mixing.
    If you kind of 'insist' on doing it the old way, you can export the audio from your recorded MIDI+VSTi creations track by track like this: Leave the Sequencer window open, make a selection in the multitrack that covers the time span you have played. Solo the track (will mute all others), and use File / Export Audio Mixdown. Use 'Master' as the source. This will give you a wave rendering of what's currently in the MIDI sequencer. Qualitywise this is better since it's all internal and digital instead of in/out of soundcards with DA/AD conversion etc.
    I haven't found a method for a 'live' wave recording while you play, but there may be one...
    If you purchase Audition it comes with Help files explaining this in more/better detail. ;)

Maybe you are looking for

  • Hp Pavilion Tx1000 Bad Bios Flash

    Hi everyone, I recently bought and hp pavilion tx1000 series (tx1030la) it has the common overheating problem in wich the GPU chip desolders, I fixed it with the help of some youtube videos (the penny fix) and everything was working perfectly until I

  • Running Workflow step in Background & code inside doing Foreground proceing

    Hi all, I am extracting an attachment (file) from DMS (document management services: txn: CV02N) to the presentation server in Background Mode.  Again my Function Module is uploading the file in the forground Mode and at this point workflow is giving

  • Lenovo X200 refuses to go to sleep

    Hi,  I am having problems with my Lenovo X200 refusing to go to sleep. When I hit Fn-F4 or choose sleep from the menu, the screen goes black, the computer fan/harddisk noise goes down just as if it is going to sleep, it beeps and the moon lights up.

  • Animated Gif - States All Affected At Once

    I normally use Fireworks to make animated gifs, but recently (not sure what happened) all of my states have decided to combine or group together and I can no longer edit each state individually. If I move anything (symbols, layers, etc), then all sta

  • AttachMovie problem animating

    I have a bit of an odd problem with attachMovie. In my library I have several movies all build up in pretty much the same way. They are a couple of frames long with a different image on each frame. They have a color layer at 70% as sort of an overlay