Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Korn Shell Scripting
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Korn Shell Scripting

  1. #1
    Junior Member
    Join Date
    Feb 2002
    Posts
    59

    Korn Shell Scripting

    HI Everyone,

    Well I got this page from class and we are doing a bit of simple korn shell scripting, however every single example he has listed I try to run as a test to visually see how its working and none of his sample scripts work.

    Does anyone know of a good link to start out with for some very basic korn shell scripting. I can get the main function of the scripts to work but to add comments the shell just ingores the comments and then goes onto the main function of the script.

    Any good links would be much appreciated.

    TIA

    NeoStar

  2. #2

    Re:Korn Shell Scripting

    Hey NeoStar01 -
    google gave me this and it never lies!! i like the 2nd link best
    http://www.google.com/search?hl=en&l...ts&spell=1

  3. #3
    Junior Member
    Join Date
    Feb 2002
    Posts
    59

    Re:Korn Shell Scripting

    Howdy pbharris,

    always trust your word on things. but um the linky doesn't go to a search result ;D

    What key words did you use and maybe I can get he same results with the second link like you said.


  4. #4

    Re:Korn Shell Scripting

    Looks like the link has been munged.

    http://www.google.com/search?hl=en&l...ts&spell=1

  5. #5

    Re:Korn Shell Scripting

    argg!! thanks for fix segfault!

  6. #6
    Junior Member
    Join Date
    Feb 2002
    Posts
    59

    Re:Korn Shell Scripting

    Thanks guys! bookmarking and reading.

  7. #7
    Junior Member
    Join Date
    Feb 2002
    Posts
    59

    Re:Korn Shell Scripting

    :-[ :-[

    I am not able to get any scripts running at all. Even from the sample web pages.

    Have even modified my profile to include in the path /bin/ksh and im not sure what is wrong.

    Really frusterated not being able to even run sample scripts so i can see how it works or learn for that matter.

    Any ideas? What additional info do you need? wnat me to paste my entire PATH here?

  8. #8
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re:Korn Shell Scripting

    Did you make your scripts executable, like "chmod 755 myscript.sh"?

  9. #9
    Junior Member
    Join Date
    Feb 2002
    Posts
    59

    Re:Korn Shell Scripting

    [quote author=cloverm link=board=9;threadid=4523;start=0#45835 date=1029438915]
    Did you make your scripts executable, like "chmod 755 myscript.sh"?
    [/quote]

    Yes I did, did a chmod 0700 filename in habit of doing that.

    if i run the script juts by typing in the filename it puts me back to the prompt.

    if i try it by doing this....
    ksh filename
    i get this return..

    ksh: test: 0403-006 Execute permission denied.

    so not sure what is going on. This is sample script taking from webpage.

    Code:
    #!/bin/ksh
    if [[ $expr $(date +%H) \< 12) == 1 ]]
    then
    echo "Good Morning"
    else
    echo "Good afternoon"
    fi
    Thi s is not one i wrote myself, taken from above google search script page. second link. im presuming its correct otherwise they wouldn't show the example. but etither way it doesn't work on the unix server.

    ??? ??? ???

  10. #10
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re:Korn Shell Scripting

    chmod 700 is not good! You have to do chmod 755. Also run you scripts as ./scriptname if you are in the same folder.

Similar Threads

  1. Some shell scripting links
    By Outlaw in forum Linux - Software, Applications & Programming
    Replies: 7
    Last Post: 03-19-2010, 05:20 AM
  2. Good shell scripting book
    By tech291083 in forum Redhat / Fedora
    Replies: 2
    Last Post: 05-13-2007, 01:01 PM
  3. shell scripting question in hpux11
    By in forum Programming
    Replies: 0
    Last Post: 02-04-2003, 05:51 PM
  4. Replies: 1
    Last Post: 04-05-2002, 08:25 PM
  5. linux and korn
    By coltrane in forum Linux - Software, Applications & Programming
    Replies: 7
    Last Post: 01-11-2002, 01:47 AM

Bookmarks

Posting Permissions

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