Macros stored as aliases (AcuSolve, Tips&Tricks)

“Did You Know” that Windows and Linux platforms both allow users to define simple macros and store them as an aliases? These types of command shortcuts come in very handy when performing routine tasks such as cleaning up old meshing log files, cleaning up output files from old solver runs, etc. The following examples illustrate some useful applications of this capability:

The following example aliases the command “tidy” to delete unnecessary files from an AcuSolve run:
alias tidy ‘rm -rf *mpi* *pbs* *.error *.hosts *.echo core*
*.bat *.out *.inc *.o Makefile readAcuSolve.fvx’

The following example deletes all of the files covered by “tidy” as well as the entire AcuSolve output directory and Log file:
alias clean ‘tidy; rm -rf ACUSIM.DIR *warnings *.Log ‘

The following example aliases the command “tidyMesh” to delete output files from an AcuMeshSim run:
alias tidyMesh ‘rm -rf MESHSIM.DIR *.sts *.agm __acugs.log
meshsim.jou *.MeshSim.txt *.arm’

The following example aliases the command “cleanMesh” to delete all output and input files from an AcuMeshSim run:
alias cleanMesh ‘rm -rf *.ams MESHSIM.DIR *.sts CAD.DIR *.agm
__acugs.log *MeshSim* meshsim* *.ams’

Note that the above commands utilize Linux’s csh syntax, but a similar
syntax exists for Windows. The following references provide more
information:

Windows:
http://devblog.point2.com/2010/05/14/setup-persistent-aliases-macros-in-windows-command-prompt-cmd-exe-using-doskey/

Linux:
http://www.linfo.org/alias.html

Have a question or comment?

Post your comment/question on our user forum.