bash - What does < in Shell Scripts do? -
this question has answer here:
- what symbols -, < , > mean? 1 answer
for example,
matlab -nodesktop -singlecompthread < run%d/run.m
i know means matlab suppose use run.m file in run%d directory mean shells in general?
by itself, command <
filename tells shell run named command input coming file filename, instead of terminal typed command line.
you can go other way, too, sending output of command file, command >
filename.
there 2 different output streams connected terminal - normal one, called "standard output" , redirected >
, , "standard error" stream, lets program tell when went wrong though normal output going file instead of terminal. if don't want see error messages, want them go terminal well, can use >&
filename.
if want send errors own separate file, can use 2>
*error_filename*; leaves standard output stream alone, going terminal or wherever sent >
or |
.
there's lot more can do, use output of 1 command file anywhere command expects filename. see the link konsolebox posted more details.
Comments
Post a Comment