Benefits and drawbacks of scripts and batch programs?
Question by tara72: Benefits and drawbacks of scripts and batch programs?
can you give me a specific pair of comparable DOS and LINUX commands that would be most useful in a batch or script file.
Can you please let me know how they compare and might be used, give benefits and drawbacks thanks.
Best answer:
Answer by ?
DOS = findstr
UNIX = grep
These two commands are used to examine the CONTENTS of files for a specific string of characters. This is the equivalent of asking the question, “If string ‘xxx’ exists in file(s) yyy”.
DOS = type
UNIX = cat
Cat is short for “concatenate.” While it can be used to join files (mostly text files), its primary use is to write data from a file to the screen (UNIX stdout). Using redirection (pipes), output can be sent to files and printers.
There are many more. Generally, UNIX scripting commands have more options and more capabilities than their DOS counterparts.
Know better? Leave your own answer in the comments!