Re: Help adding a larger drive to Alphaserver

From: Carl Perkins (carl_at_gerg.tamu.edu)
Date: 08/05/03


Date: 5 Aug 2003 16:29 CDT

In article <iaT$fAVgJuL6@eisner.encompasserve.org>, koehler@eisner.aspm.encompasserve.org writes...
}In article <3F2F1360.ECE1A9BA@fsi.net>, "David J. Dachtera" <djesys.nospam@fsi.net> writes:
}>
}> ...but the implementation is a bit different. The VMS equivalent of
}> stderr cannot be redirected by 2>..., input cannot be redirected using
}> "<", and ">>" cannot be used to append to an existing file (at, least,
}> it doesn't work for me on V7.3-1). The following sequence would emulate
}> some of those features, however:
}
} Just like moving between eunichs shells. Ever try 2> in csh? To my
} knowledge you can redirect 1 in csh, and you can add 2 to the path
} chosen for 1, but you can't separately redirect 2. So I use ksh.
}
} As for < and >>, I'm quite sure I've used them in DCL, but I'll
} have to run off and see if I can come up with working examples.
} I've often had trouble with commands in any shell that wouldn't
} work with < the way I thought they should.
}
}> $ PIPE -
}> (DEFINE/USER SYS$INPUT LOGIN.COM ; -
}> TYPE SYS$INPUT) | -
}> (DEFINE/USER SYS$ERRROR SEARCH_ERROR.LIS ; -
}> SEARCH SYS$PIPE "SET DEF")
}
}
} The following has the same result on my 7.2-1 system, I tried
} it with search strings that were and were not in login.com, and
} when seach_error.lis did and did not already exist:
}
} $pipe -
} (DEFINE/USER SYS$INPUT LOGIN.COM ; -
} TYPE SYS$INPUT) | -
} SEARCH SYS$PIPE "SET DEF" 2> SEARCH_ERROR.LIS
}

AS has been pointed out, this is covered in the help. From the help
on V7.2-1:

       o Input/output redirection

          A command sequence can redirect its SYS$INPUT, SYS$OUTPUT,
          or SYS$ERROR to a file during execution of the command as
          follows.

          To redirect SYS$INPUT:

             PIPE command-sequence < redirected-input-file

          To redirect SYS$OUTPUT:

             PIPE command-sequence > redirected-output-file

          To redirect SYS$ERROR:

             PIPE command-sequence 2> redirected-error-file

          A pipeline-segment command can also redirect its SYS$INPUT,
          SYS$OUTPUT, or SYS$ERROR. However, SYS$OUTPUT redirection
          is allowed only for the last pipeline-segment command, and
          SYS$INPUT redirection is allowed only for the first pipeline-
          segment command.

--- Carl



Relevant Pages

  • Re: How to list the first 10 lines error from executing command
    ... | In sh, it works, but I'm using tcsh and csh, it said that it was ... | ambiguous redirect output, do you mind telling me again how to do it ... You can't redirect stderr separate from stdout in csh, only both, like ...
    (comp.unix.programmer)
  • Re: find
    ... > to redirect just stderr. ... there is no good way to do it with *csh but if someone wanted to do ... Quite the hack. ...
    (comp.unix.shell)
  • Re: Ambiguous output redirect
    ... "Ambiguous output redirect." ... or change your shell to a bourne shell compatible one like bash. ... PS In csh the ">&" means redirect to a file including stderr, in this case the file "1"; then you are telling it to also pipe to something, which is impossible since you just redirected to a file. ...
    (freebsd-questions)
  • Re: redirect the output to a file
    ... you have two commands executed in sequence. ... That will cause all output from /make/ to stdout to be sent to ... error messages sent to stderr will only go to the screen. ... Will first redirect stderr to stdout, then send it all to /tee/. ...
    (comp.os.linux.misc)
  • Re: [Full-Disclosure] cmd.exe bug in win2k sp4 in "for" loop ... erratum
    ... " When you redirect a program's output, ... specifiy which output you want (STDOUT or stderr)." ... stdin is used for inputs, ...
    (Full-Disclosure)