Viewing 8 posts - 1 through 8 (of 8 total)
  • UNIX experts / shell. help – whats this doing?
  • roady_tony
    Free Member

    long story short, did some ksh in the past, been roped into this, but have never seen this before in a ksh:

    # Utility:Run:No. Var:Var.1:Var.2:Var.3:Var.4:Var.5:Var.6
    ##
    #
    # Remove the /apps/1/confg/s/sers directory
    #
    r_dir:Y:4:/apps/1/confg/s/sers

    is it calling another shell script with the paramers Y 4 /apps/1/confg/s/sers ?
    whats the purpose of the ‘:’ why not the normal way of
    r_dir Y 4 /apps/1/config/s/sers

    or is this ksh file being read by something else and the ‘:’ is a delimeter???

    any help much appreciated.

    woody2000
    Full Member

    is it calling another shell script with the paramers Y 4 /apps/1/confg/s/sers ?

    That, I think. Is there a script called r_dir somewhere?

    roady_tony
    Free Member

    more google searching – wonder if its something to do with ‘getopts’ and using ‘:’ ?

    oldnpastit
    Full Member

    I think the comment on line 1 is a clue…

    leeodraper
    Free Member

    I don’t think that the file is a script because there is no #!/bin/ksh at the start of the file. I suspect that a shell script reads this file for data and that the : are delimiters.

    samuri
    Free Member

    Is this the entire file?
    Because if it is then as above r_dir must be somewhere else.
    It could be an executable or it could be another script but that’s the one doing the work.

    from what you’ve provided anyway.

    BigButSlimmerBloke
    Free Member

    Taking a guess – there’s a script called r_dir – you could always use

    find / -name r_dir

    to see if that finds it
    Continuing the guesswork, this script, run from the command line will ask you to confirm it’s action (Y to confirm), which would be the Run parameter. No idea what the number is
    Based on

    # Remove the /apps/1/confg/s/sers directory

    I’d hazard a guess that the script will delete the /apps/1/.. directory without asking for confirmation

    roady_tony
    Free Member

    thanks everyone, as most of you suspected and i did too and found it, its a parameter file to hold parameters delimitered with : thats read by a KSH script somewhere else
    ta for the help!!!

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘UNIX experts / shell. help – whats this doing?’ is closed to new replies.