Friday, October 18, 2013

Input arguments for /scanf/ type commands

For executables that require user-input, data can be fed in the following manner:

echo 5|pdb2gmx -f box.his.pdb -o box150

where 5 is the input argument that would otherwise have to be given after pdb2gmx takes its time running through its code that comes before a scanf type statement. This approach saves time and automates the process provided you know which argument to feed in. You can extend this any number of arguments like so...here 5 is argument 1 and 50 is argument 2.

echo 5 50|pdb2gmx -f box.his.pdb -o box150

No comments:

Post a Comment