Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: opensue 10.2 vs 11

  1. #1

    Default opensue 10.2 vs 11

    hi all, if anyone could help me out here, may i know what is the shell different between opensuse 10.2 and 11.

    when i type #man exit in both of them, one show bash builtin and another one show tcl builtin, and one of my user claimed that its because of the "exit" command in opensuse 10.2 that caused the script got problem?

    #ps --> and both shows

    PID TTY TIME CMD
    24190 pts/2 00:00:00 bash
    24216 pts/2 00:00:00 ps

  2. #2

    Default Re: opensue 10.2 vs 11

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    May be quicker to test your 10.x system on your own:

    > rpm -qi bash


    My SLED 11 x86_64 system has version 3.2. An 11.1 system next to me has
    the same, so 11.0 probably does too. A SLES 10 system I have has 3.1.

    Good luck.





    vernon wong wrote:
    > hi all, if anyone could help me out here, may i know what is the shell
    > different between opensuse 10.2 and 11.
    >
    > when i type #man exit in both of them, one show bash builtin and
    > another one show tcl builtin, and one of my user claimed that its
    > because of the "exit" command in opensuse 10.2 that caused the script
    > got problem?
    >
    > #ps --> and both shows
    >
    > PID TTY TIME CMD
    > 24190 pts/2 00:00:00 bash
    > 24216 pts/2 00:00:00 ps
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJLV81NAAoJEF+XTK08PnB5OQQQAIK43TYSXbjWl7D3gMUh1GFh
    BbxC12NRSA7SmUtPP+xwdGKV29uwl7RMJ6USi2f0MSUPp4aYJ5AZecYbVQkQyYix
    wijsF7Zgmxm7mDgSURx6m8veQE1KlAXzk6qnNoXxv9qZ743gmltXpuUqxi87IjLN
    8bwrz7TrVssY+M85H6ToaFVbwGMta+9V1E964htm+rKguniiBL/AKdfzGfCmM+yj
    cNo56XQQ+Jt/7WWM5Tmmfw6Qv0Y/uTO8VlxI9Z8GJzfm3+PEr3CB6GOIcp1Iwr4a
    yw9gGQIYHBrrlIh1ETAPVDMFsYAKCVty4eR9ZJKjEkiNFwMYm492tnu7H6gwiyaj
    IimeoqfxSVPWW8scFZsJS8W6Syojl4Y0nahJb4sSQkoWC6KTjWTXUDeZ5YInUalg
    kxQSfv3zF+Lk3qJXEhPpBKBuGobniANThXQvG29c7kX4eiTX16oWuhGxPHJ+noSR
    U6kcF16MdwHEwh2Sps/OX+dfUoHq2qhqoTSjOIxLxbnmCMiBtStNkY2WP/5W5o+h
    h61KEShIUITlxhdOY/xxG9846eau1UHG9yb75AhitH6xMdZ8ErkhvgeljMQH/mph
    RK06Z6dm+7OM8QHhU3VyWf3LW5zkiJfcsY9swjq68gKY5s/PFIw58My1v67H/MML
    EDxpNEut/Dik29Gx0abr
    =2PmI
    -----END PGP SIGNATURE-----

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: opensue 10.2 vs 11

    Quote Originally Posted by vernon_wong View Post
    hi all, if anyone could help me out here, may i know what is the shell different between opensuse 10.2 and 11.

    when i type #man exit in both of them, one show bash builtin and another one show tcl builtin, and one of my user claimed that its because of the "exit" command in opensuse 10.2 that caused the script got problem?
    I doubt this. The priority of the man pages is not related to the order of the command searching in bash. A builtin will override any external command. And anyway the Tcl exit is only available inside Tcl programs.

    To find out what exit really does, use the type command:

    Code:
    type exit
    On my system these are the results, on exit and ls:

    Code:
    $ type exit ls
    exit is a shell builtin
    ls is aliased to `ls $LS_OPTIONS'
    It could be your user aliased exit to something else. Aliases have precedence over builtins.

  4. #4

    Default Re: opensue 10.2 vs 11

    there is a dedicated user ID for running all the scripts. in this case, the default shell will be using csh.

    i tried #type exit in the csh environment, it does not recognized the command?

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: opensue 10.2 vs 11

    Well you didn't say you were using csh, that's different from bash.

    It's been years since I used csh, but you can check what a command does with:

    which exit

  6. #6

    Default Re: opensue 10.2 vs 11

    my apology, maybe i explain in brief before hand. I am the system administrator, and i do not write script.

    We have 2 version of opensuse installed, 10.2 and 11. The user ID running the script will be defaulted to csh upon login.

    now, trying both script, it works properly on ver 11, and some error on ver 10.2.

    i check, #which exit and the result is
    exit: shell built-in command. should be no problem.

    part of the coding

    set sdd_dir = "/net/shark/dnc_5000/sdd"
    ls $sdd_dir/*$JOB* > /tmp/newjob.$JOB

    set pho_job = "k"$JOB.pho

    set newjob = "yes"
    #***
    perl /genesis/sys/scripts/netlist_drc_check.pl $JOB
    source /tmp/netlist_drc.$JOB
    rm -f /tmp/netlist_drc.$JOB
    if ($user_choice == "nogo" || $ONLINE_DRC_STAT != "GREEN" || $ONLINE_NET_STAT != "GREEN" ) then
    echo "$user_choice $ONLINE_DRC_STAT $ONLINE_NET_STAT"
    exit ERROR
    # exit
    endif


    the script person said the error was causing by the exit command not handled the same way. In this case, it suppose to end the script, but it didnt.

  7. #7
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: opensue 10.2 vs 11

    Well that's a programming error. exit in csh requires a number after it which is the exit status of the command. It should be something like:

    Code:
    exit $ERROR
    where $ERROR is set earlier in the script or maybe

    Code:
    exit 1
    It could be that a different version of csh behaves differently to this programming error.

  8. #8

    Default Re: opensue 10.2 vs 11

    marked the "exit ERROR" its still the same...

    there is a main script calling some sub script, whereby a pop up screen asking for continue or quit.

    when the user click quit, it suppose to end the script, this work on version 11, but in version 10.2 the sub script still continue running even the selection is "quit"

  9. #9
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: opensue 10.2 vs 11

    Probably another programmer error, relying on undefined behaviour of the shell.

  10. #10
    palladium NNTP User

    Default Re: opensue 10.2 vs 11

    vernon wong wrote:
    > this work on version 11, but in version 10.2


    i have the feeling he is not running openSUSE 10.2 and 11.x, but
    rather with SUSE Linux Enterprise Server (or Desktop) version 10 SP2
    or version 11

    please Mr. Wong, report the results of

    cat /etc/SuSE-release

    --
    palladium

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •