What shell script found in /usr/sbin and /usr/bin in OS X made out off?

What shell script found in /usr/sbin and /usr/bin in OS X made out off?
thanks.

You may have to provide more detail on what you're wanting to know if this doesn't answer your question.
Shell scripts are just text files. You can create or open them with any text editor. They are executed by one of the command interpreters (such as sh, bash, csh, etc) or by a language interpreter (like perl or ruby). However, many of the items in the directories you mention are not shell scripts but rather binary executables. These are executed by the OS.
You can use something like this to show you which are which:
file /usr/bin/*
Steve

Similar Messages

  • Difference between /usr/sap/ and /usr/sapmnt/  Directories

    Hi all,
       I want to know the difference between /usr/sap/ and /usr/sapmnt/ directiories. We are having exe,profile and global in both directories.
    Thx
    Ral

    /usr/sap is symlink to the /usr/sapmnt. You can study this link ( point 2 in procedure) to understand better
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/37782a21fc11d288cd0000e83539c3/content.htm
    Reward points if useful

  • What is the relationship between CGI-Executables and cgi-bin?

    I am trying to get CGIs working locally on my Mac and am having difficulty understanding the relationship between CGI-Executables/ and cgi-bin/.
    I have activated CGI in my httpd.conf file, and have the following perl test script: /Library/WebServer/CGI-Executables/test.cgi file, and have the file permissions set appropriatly
    If I call the script from the actual url: http://127.0.0.1/CGI-Executables/test.cgi, it doesn't work. If I use: http://127.0.0.1/cgi-bin/test.cgi, it works fine.
    Why cgi-bin and not CGI-Executables? What is the relationship between /Library/WebServer/CGI-Executables/ and cgi-bin?
    And how do I get CGIs working in individual users' Sites/ file? Do all CGIs go in the /Library/WebServer/CGI-Executables/ directory, or can each users' Site/ directory have it's own cgi-bin?
    Ti Powerbook G4   Mac OS X (10.4.4)  

    Now I am having trouble getting CGI to work in the user directories. I have a perl script that works for 127.0.0.1/cgi-bin/test.cgi, but not for 127.0.0.1/~joe/cgi-bin/test.cgi.
    My apache error log says:
    [Tue Feb 14 08:14:23 2006] [error] [client 127.0.0.1] Options ExecCGI is off in this directory: /Users/joe/Sites/cgi-bin/first.cgi
    Permissions for Library/WebServer/CGI-Exectuables/test.cgi and /Users/joe/Sites/cgi-bin/ are 777.
    I think the problem is somewhere in my directory configs. Apache has so many, it's hard to know what's what.
    Here's the first directory directives in httpd.conf:
    # First, we configure the "default" to be a very restrictive set of
    # permissions.
    <Directory />
    Options FollowSymLinks
    AllowOverride Options
    </Directory>
    Farther down, there's this, which I added ExecCGI and index.cgi:
    # Control access to UserDir directories. The following is an example
    # for a site where these directories are restricted to read-only.
    <Directory /Users/*/Sites>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
    DirectoryIndex index.html index.cgi
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>
    Then down at the bottom of the file is something I suspect was added automatically when the user account was created:
    Include /private/etc/httpd/users/*.conf
    <Directory "/Users/joe/Sites/">
    Options Indexes MultiViews Includes
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    To further confuse things, there is another file /etc/httpd/user/joe.conf that has additional user-directory directives:
    <Directory "/Users/joe/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    Is there something in all these directory configurations that is preventing the user from accessing cgi-bin? Can I add directives to an .htaccess file in the user directory.
    Ti Powerbook G4   Mac OS X (10.4.4)  

  • Shell Script - Need to Open terminal and Print output?

    Hi All,
    I have a script to update a git version of a software, but I would like to be able to check the output of the script in a terminal.
    So in a nut shell, I want when launching the script:
    - Terminal to Open
    - All command to be executed in the terminal
    - Terminal to close only if no error (do not know if it's possible?)
    See below my very simple script:
    Many thanks in advance for your time and advice,
    rm -r /home/sweetth/banshee &&
    cd /home/sweetth &&
    git clone git://git.gnome.org/banshee &&
    cd /home/sweetth/banshee &&
    ./autogen.sh &&
    make

    Right,  I manage it differently
    So I got my script to dl those PKGBUILD for those Ipod library needed for the latest Banshee, then dl the latest banshee git and "make" it.
    for those who might be interested to keep their banshee-git update:
    #!/bin/bash
    xterm -hold -e "mkdir ~/libpod;
    cd ~/libpod;
    mkdir ~/libpod/gtk-sharp-beans-git
    cd ~/libpod/gtk-sharp-beans-git
    wget http://aur.archlinux.org/packages/gtk-sharp-beans-git/gtk-sharp-beans-git/PKGBUILD;
    wget http://aur.archlinux.org/packages/gtk-sharp-beans-git/gtk-sharp-beans-git/autogen_fix.patch;
    makepkg -s;
    mv gtk-sharp-beans-git** ~/libpod;
    cd ~/libpod;
    rm -rf ~/libpod/gtk-sharp-beans-git;
    mkdir ~/libpod/gio-sharp-git;
    cd ~/libpod/gio-sharp-git;
    wget http://aur.archlinux.org/packages/gio-sharp-git/gio-sharp-git/PKGBUILD;
    makepkg -s;
    mv gio-sharp-git** ~/libpod;
    cd ~/libpod;
    rm -rf ~/libpod/gio-sharp-git;
    mkdir ~/libpod/gkeyfile-sharp-git;
    cd ~/libpod/gkeyfile-sharp-git;
    wget http://aur.archlinux.org/packages/gkeyfile-sharp-git/gkeyfile-sharp-git/PKGBUILD;
    makepkg -s;
    mv gkeyfile-sharp-git** ~/libpod;
    cd ~/libpod;
    rm -rf ~/libpod/gkeyfile-sharp-git;
    mkdir ~/libpod/gudev-sharp-git;
    cd ~/libpod/gudev-sharp-git;
    wget http://aur.archlinux.org/packages/gudev-sharp-git/gudev-sharp-git/PKGBUILD;
    makepkg -s;
    mv gudev-sharp-git** ~/libpod;
    cd ~/libpod;
    rm -rf ~/libpod/gudev-sharp-git;
    mkdir ~/libpod/libpod-sharp-git;
    cd ~/libpod/libpod-sharp-git;
    wget http://aur.archlinux.org/packages/libgpod-sharp-git/libgpod-sharp-git/PKGBUILD;
    makepkg -s;
    mv libgpod-sharp-git** ~/libpod;
    rm -rf ~/libpod/libpod-sharp-git;
    cd ~/libpod;
    sudo pacman -U gtk-sharp-beans-git** gio-sharp-git** gkeyfile-sharp-git** gudev-sharp-git** libgpod-sharp-git**;
    rm -rf ~/banshee;
    cd ~;
    git clone git://git.gnome.org/banshee;
    cd ~/banshee;
    ./autogen.sh;
    make;
    rm bin/Banshee.NotificationArea.dll*"

  • Power shell script to list all files and folder permissions recursively

    Hi All,
    I am looking for a powershell script to perform the following operations.
    1) To list the folder and file permissions(Allow,Deny both) recursively in a given folder.
    2) List out all the files and folders which are having the deny permission or having only the read access (or) only the write access. Basically the folder should have Read,Execute,Write permissions. Else we have to flag that file/folder name.
    I had written a batch script for the same which does this task using icacls.exe output, but this script takes lot of time to recursively parse all the files ( ~1 lakh files).
    Please help me with the powershell script for the same.
    Thanks
    Sambasiva

    Try this module: http://gallery.technet.microsoft.com/scriptcenter/PowerShellAccessControl-d3be7b83
    After importing the module, you can run something like this:
    dir c:\folder -recurse | Get-AccessControlEntry
    That output can be exported to a CSV for later viewing. You can also provide some parameters to Get-AccessControlEntry to limit the results:
    dir c:\folder -recurse | Get-AccessControlEntry -FileRights Write
    dir c:\folder -recurse | Get-AccessControlEntry -AceType AccessDenied
    dir c:\folder -recurse | Get-AccessControlEntry -AceType AccessAllowed -FileRights Write

  • 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.

  • Shell Script Adapter - what kind of sudo privilege needed?

    Hi All,
    I have a requirement in my project where I need to manage unix user provisioning and de-provisioning by using shell scripts in AIX servers. For this purpose, I selected Shellscript adapter as it allows us to execute scripts that run on the resource.
    1. while I have account in the AIX server, I need to know what kind of sudo privilege is needed. Will I need sudo access to root? if yes, does it mean, I (or my account) should be added to root? please let me know.
    2. also, I tried configuring the adapter using the login id, host, password, login shell prompt, port and SSH. When i tried to test the configuration, it gave the following error,
    Test connection failed for resource(s):
    Shell Script: Failed to find 'useradd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'usermod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'userdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
    I am wondering why should it search for these commands? please let me know.
    thanks.

    Hi All,
    I got this issue resolved after a fine-grained sudo setting to the account that is used for provisioning.
    The revised sudo setting was able to do all the provisioning tasks without having a root access.
    This is what I set on my service account
    (root) /bin/awk, /bin/cat, /bin/cp, /bin/cut, /bin/grep, /bin/login, /bin/mv, /bin/rm, /usr/bin/auths, /usr/bin/cat, /usr/bin/chgroup, /usr/bin/chgrpmem, /usr/bin/chsec, /usr/bin/chsh, /usr/bin/chuser, /usr/bin/cp, /usr/bin/last, /usr/bin/lastlog, /usr/bin/listusers, /usr/bin/logins, /usr/bin/lssec, /usr/bin/mkgroup, /usr/bin/mkuser, /usr/bin/mv, /usr/bin/passwd, /usr/bin/profiles, /usr/bin/pwdadm, /usr/bin/rm, /usr/bin/roles, /usr/sbin/groupadd, /usr/sbin/groupdel, /usr/sbin/groupmod, /usr/sbin/lsgroup, /usr/sbin/lsuser, /usr/sbin/rmgroup, /usr/sbin/rmuser, /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod, /usr/sbin/logins
    (root) NOPASSWD: /usr/bin/chgrp, /usr/bin/chmod, /usr/bin/chown, /usr/bin/chpasswd, /usr/bin/cp
    In this way, you need not have to be a root user to perform provisioning using AIX.
    Hope this helps!!
    thanks.

  • Fedora merging /usr/bin with /sbin and /bin

    I just read this mail on the fedora list regaring the proposal to merge the different directories for binaries:
    https://lists.fedoraproject.org/piperma … 58845.html
    It does seem like a practice from times long gone.
    What is your take on this? Wouldn't this be something in the spirit of Arch, too?

    I came across this interesting proposal and was interested how the Archlinux community feels about this:
    http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge wrote:
    Improved compatibility with other Unixes/Linuxes in behaviour: After the /usr merge all binaries become available in both /bin and /usr/bin, resp. both /sbin and /usr/sbin (simply because /bin becomes a symlink to /usr/bin, resp. /sbin to /usr/sbin). That means scripts/programs written for other Unixes or other Linuxes and ported to your distribution will no longer need fixing for the file system paths of the binaries called, which is otherwise a major source of frustration. /usr/bin and /bin (resp. /usr/sbin and /sbin) become entirely equivalent.
    Improved compatibility with other Unixes (in particular Solaris) in appearance: The primary commercial Unix implementation is nowadays Oracle Solaris. Solaris has already completed the same /usr merge in Solaris 11. By making the same change in Linux we minimize the difference towards the primary Unix implementation, thus easing portability from Solaris.
    Improved compatibility with GNU build systems: The biggest part of Linux software is built with GNU autoconf/automake (i.e. GNU autotools), which are unaware of the Linux-specific /usr split. Maintaining the /usr split requires non-trivial project-specific handling in the upstream build system, and in your distribution's packages. With the /usr merge, this work becomes unnecessary and porting packages to Linux becomes simpler.
    Improved compatibility with current upstream development: In order to minimize the delta from your Linux distribution to upstream development the /usr merge is key.

  • How to parse a text file and produce a dynamic shell script for linking?

    I have some mapping files, one example is like this one;
    $ cat CON_xfrm_contract_to_20080302.map
    (object mfile_c_type
    (path "file:OBSOLETE")
    (fs "file://amanos/s01/abinitio/data/prod/mfs/mfs_16way")
    (local_paths 16
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_002/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_003/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_004/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_005/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_006/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_007/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_008/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_009/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_010/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_011/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_012/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_013/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_014/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_015/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"))In this file's content I have some exracted text files with same names under different folders;
    $ ls -lt /s01/abinitio/data/prod/mfs/parts/mfs_16way_*/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat   [
    -rw-rw-rw-   1 ab_live  abinitio 438652105 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_010/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438490410 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438219252 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_007/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438521432 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_014/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438488130 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_003/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438249547 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_002/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438312177 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_012/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 439074566 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_015/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438722261 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_004/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438742477 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438517268 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_008/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438645835 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_011/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438334994 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_006/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438470743 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_005/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438095853 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_009/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    -rw-rw-rw-   1 ab_live  abinitio 438434204 Mar  3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_013/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.datI need a shell script which will produce a shell script from the content of the mapping file so that I can be able to symbolicly link these files with different names and under the same folder, like;
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat ./mfs_16way_001.CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat ./mfs_16way_016.CON_xfrm_contract_to_20080302.datI am a newbie for shell scripting, I tried several awk and sed operations but couldn't get close to this output :(
    If you guide me I will be so glad, thank you.
    ps: amanos is the name of this server.

    this is thepoint that I am stuck, I can not add the destination sym.link name to the end of each line;
    $ grep "  \"file://amanos" CON_xfrm_contract_to_20080302.map | cut -c17- | sed  's/"//;s/)//g' | sed 's/\/s01/ln -s \/s01/g'
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_002/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_003/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_004/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_005/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_006/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_007/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_008/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_009/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_010/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_011/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_012/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_013/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_014/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_015/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
    $ /)//g' | sed 's/\/s01/ln -s \/s01/g' | awk -F\/ '{print $8"."$14}'                                                       <
    mfs_16way_001.CON_xfrm_contract_to_20080302.dat
    mfs_16way_002.CON_xfrm_contract_to_20080302.dat
    mfs_16way_003.CON_xfrm_contract_to_20080302.dat
    mfs_16way_004.CON_xfrm_contract_to_20080302.dat
    mfs_16way_005.CON_xfrm_contract_to_20080302.dat
    mfs_16way_006.CON_xfrm_contract_to_20080302.dat
    mfs_16way_007.CON_xfrm_contract_to_20080302.dat
    mfs_16way_008.CON_xfrm_contract_to_20080302.dat
    mfs_16way_009.CON_xfrm_contract_to_20080302.dat
    mfs_16way_010.CON_xfrm_contract_to_20080302.dat
    mfs_16way_011.CON_xfrm_contract_to_20080302.dat
    mfs_16way_012.CON_xfrm_contract_to_20080302.dat
    mfs_16way_013.CON_xfrm_contract_to_20080302.dat
    mfs_16way_014.CON_xfrm_contract_to_20080302.dat
    mfs_16way_015.CON_xfrm_contract_to_20080302.dat
    mfs_16way_016.CON_xfrm_contract_to_20080302.datMessage was edited by:
    antu
    Message was edited by:
    antu

  • Need a shell script file in snow leopard to start and stop VPN connection

    As the Question says, I need a shell script file to do this, and since I don't know anything about creating a script file I wanted to ask the Groups help.  I need it because I need to run a backup program, and need the backup program to run the Connect script to connect to the VPN before it starts the backup, and then when it completes the backup to run the disconnect script.  Your help is greatly appreciated.  Thanks.

    Hi, thanks for your prompt reply. However my real problem is not starting
    it but stopping it cleanly. I am forced to restart the display from time to time (once/per hour) because it is getting 'stuck' for some reason and the web page is out of my control.
    I tried simply killing the firefox process using kill command and then starting a new one but it works one or two times and then the next firefox process demands mouse communication. And that is not available. Also this has to work without any expert present as the display is in a public area.

  • Automator: running forever after executing a shell script?

    Hi,
    so i have found this little automator workflow that will start MAMP's Apache & MYSQL servers automatically (saved workflow as app then put into my login item autostart) however the script just keeps running forever and never exits (which should prompt a small Growl notification as feedback.
    The Script:
    <pre class="jive-pre" style="white-space:pre-wrap;width:585px;">
    on run {input, parameters}
    *do shell script* "/Applications/MAMP/Library/bin/apachectl start" password "my_password" user name "jannis" with administrator privileges
    *do shell script* "/Applications/MAMP/Library/bin/mysqld_safe --port=3306 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --lowercase_tablenames=0 --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --log-error=/Applications/MAMP/logs/mysqlerrorlog &"
    *do shell script* "exit 0"
    return input
    end run
    </pre>
    This is what shows when it runs:
    Any ideas on what I am doing wrong for it to just keep spinning the little cog wheel and not exiting?
    PS: Both services are being started successfully! So the shell scripts seem to be run and doing their job just fine, just that they do not exit.
    Thanks for looking.
    Jannis

    This is a common question with do shell script. The issue is that mysqld_safe doesn't exit until MySQL shuts down, so your do shell script is hanging around waiting, essentially hanging your workflow.
    The solution is to redirect the stdout and stderr of the mysqld_safe command to a temp file. This releases the hooks that do shell script has on the command allowing the workflow to continue. To do this, just append '> /dev/null 2>&1' to the end of the shell command, like:
    do shell script "/Applications/MAMP/Library/bin/mysqld_safe --port=3306 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --lowercase_tablenames=0 --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --log-error=/Applications/MAMP/logs/mysqlerrorlog >/dev/null 2>&1 &"
    As an aside:
    do shell script "exit 0"
    This line is worthless. I'm not sure what you're trying to achieve here

  • Understanding the /usr/sbin merge

    I can understand why merging the bin and sbin directories under /usr, but I don't understand why the need to merge /usr/sbin into /usr/bin. If you are looking at things where you may have a single user desktop scenario, then it can make sense as the user and the admin would be the same person. If, however, you are wanting to be running it as a multi-user, with clearly defined sets of users and superusers, then why complicate matters for normal users by throwing in a large number of binaries into their path that they won't be able to run anyway? The point could be made that 'they could access them anyway' and whilst that is true, the fact that they are in a seperate directory means you know these utilities require escalated privileges or are most likely used for system administration.

    WonderWoofy wrote:I think that you would find a happy home with something like debian.  Stability and relatively few bugs are what they are known for.
    I found a happy home with gentoo. A bit less 'at bleeding edge', but rock solid and much more stable than arch.
    But I need arch for some temporary goals.
    Allan wrote:It is amazing that despite wantonly creating new bugs and ignoring the old ones, the number of bug reports in our bug tracker is quite stable over time...
    I can explain this miracle: when something (package for example) was marked as 'irrelevant' and discarded from repo, all the bugs that relative to this package dropped as well. Instead of old bugs we getting a new 'bleeding edge' bugs. So the number of bugs remains approximately constant.

  • Problems to run shell scripts in terminal

    Hey mates,
    I'm not very experienced in writing shell scripts. However, I received a few shell scripts I wanted to execute. I used following command:
    chmod u+x model.sh
    I did not received any error message so that I think that this command works. Afterwards, I wanted to run these file with:
    ./model.sh
    However, it doesn't work, I receive an error message:
    -bash: ./model.sh: /bin/sh^M: bad interpreter: No such file or directory
    If I choose another shell script of my colleague I can run it and it works properly. What's the problem?
    I use in all shell scripts the same syntax starting with
    "! /bin/sh
    Thus, I don't see the reason why the first script isn't running while the second one is fine.
    Help appreciated!
    cheers,
    Thomas

    Unix and Terminal questions are best asked in the Mac OS X Technologies > Unix Forum
    <http://discussions.apple.com/forum.jspa?forumID=735>
    As jsd2 has pointed out, you CANNOT have Windows <CR><LF> line terminators in your file (aka ^M^J). Just about every Unix shell will choke on the <CR>
    We run into this problem all the time with users moving Unix shell scripts through a Windows system and having Windows convert the <LF> terminated Unix files into Windows <CR><LF> files, and then either use them in a Windows Cygwin environment (where they "Barf"), or move them back to a Unix system with the <CR><LF> line terminations still in the scripts, and they "Barf".
    You can look at the contents of your scripts using the following command
    cat -v script.name
    Any ^M characters found at the end of lines will be part of <CR><LF> Windows line terminators.
    You can use the following command to remove the <CR> from those files
    tr -d '
    ' <script.name >new.name
    chmod +x new.name
    If you wish to pursue this further, I would suggest using the Mac OS X Technologies > Unix Forum
    <http://discussions.apple.com/forum.jspa?forumID=735>

  • Using mail in Shell script

    Hey guys,
    I am writing a shell script to parse some data and create a csv file when done.  I want to be able to email the csv file when the script is done.  I cannot seem to figure out how to do this. I am running Mountain Lion and I have tried mail -s,  mailx at the command line in Terminal and in the script and when I go check my gmail account there is no email there.  Its not in the spam folders or the junk folder.  Any help would be appreciated

    Thank you for your reply earlier. Sorry I know that it was an applescript.  I had a suggestion to send it via applescript:  Here is the script that I wrote: It will send an email but the problem is that it fails right now cause the attachment is not working correctly. 
    -- Variables
    set recipientName to "SomeOne"
    set recipientAddress to "[email protected]"
    set theSubject to "CSV File"
    set theContent to "Here is your CSV file created from your website"
    set fileName to "HD:Users:markperryman:GinaApp:gina_20120801.csv"
    -- Mail Tell Block
    tell application "Mail"
        --Create the message
        set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
        -- Set a recipient
        tell theMessage
            make new to recipient with properties {name:recipientName, address:recipientAddress}
            tell content
                make new attachment with properties {name:fileName as alias} at after the last paragraph
            end tell
            -- Send the Message
            send
        end tell
    end tell
    and here is the error I get now:
    error "Mail got an error: Can’t make {name:alias \"HD:Users:someone:GinaApp:gina_20120801.csv\"} into type properties of attachment." number -1700 from {name:alias "HD:Users:markperryman:GinaApp:gina_20120801.csv"}
    any ideas.  Im at a loss right now.
    I have a shell script written that does most of my process.  Now I just want to write an applescript that can be called by the shell and send the email with the attachment.  So Im not sure what Im doing wrong.  As always any help would be appreciated.
    Thanks

  • 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

Maybe you are looking for