The following script will replace "mydata.dat" by "my22data.dat".
#!/bin/bash
mv mydata.dat my$1data.dat
If the script name is "changefile", type and enter in a shell prompt:
changefile 22
22 is the argument ($) taken as $1, and 1 means the first argument. In this case, there is only one argument.
This is not a blog, but my notes and tips for research. Feel free to take any information and leave any comments or questions.
Search This Blog
Subscribe to:
Post Comments (Atom)
Labels
- Academic Notes (4)
- BLAS (1)
- CEE618 (2)
- CentOS (1)
- Computation (1)
- Conferences (1)
- Cross compiling (1)
- Graphics (1)
- Hawaii Tour (2)
- Intel compiler (1)
- Just (1)
- Laptop (1)
- LaTex (22)
- Life and Humanity (8)
- Linux and Computing (107)
- LSF (1)
- Lyx (3)
- Macintosh (5)
- MPI (1)
- News (11)
- OpenFoam (1)
- OpenMPI (1)
- PBS (2)
- Software (4)
- SSH (2)
- torque (1)
- Touchpad (1)
- VMD (1)
- yum (1)
No comments:
Post a Comment