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
Saturday, June 30, 2007
Friday, June 29, 2007
Negative Index of Array Dimension
REAL, DIMENSION(-5:5) :: Z
DO i=-5,5
Z(i) = REAL(i)
WRITE(*,*) i, Z(i)
END DO
STOP
END
DO i=-5,5
Z(i) = REAL(i)
WRITE(*,*) i, Z(i)
END DO
STOP
END
Generation of Files with Sequential Names
CHARACTER (40) :: Fname='Move',str
INTEGER :: i,imax=1000000
INTEGER :: r,s
DO i = 1,10
WRITE(str,'(F7.6)') REAL(i)/REAL(imax)
r=scan(str,".")
s=len(str)
str=str(r+1:s)
WRITE(str,*) TRIM(Fname)//TRIM(str)//".dat"
OPEN(unit=imax+1,file=str)
WRITE(imax+1,*) TRIM(str)
CLOSE(unit=imax+1)
END DO
STOP
END
INTEGER :: i,imax=1000000
INTEGER :: r,s
DO i = 1,10
WRITE(str,'(F7.6)') REAL(i)/REAL(imax)
r=scan(str,".")
s=len(str)
str=str(r+1:s)
WRITE(str,*) TRIM(Fname)//TRIM(str)//".dat"
OPEN(unit=imax+1,file=str)
WRITE(imax+1,*) TRIM(str)
CLOSE(unit=imax+1)
END DO
STOP
END
Friday, June 22, 2007
How to create SVN repository
I create my own svn repository under my home directory of my Ubuntu Linux box using the following command.
svnadmin create --fs-type fsfs /home/albertsk/svn2/albertsk
kdesvn provides a wonderful GUI environment with users to easily manage svn repositories.
Good svn tutorials can be found at
http://artis.imag.fr/~Xavier.Decoret/resources/svn/
http://svnbook.red-bean.com/
svnadmin create --fs-type fsfs /home/albertsk/svn2/albertsk
kdesvn provides a wonderful GUI environment with users to easily manage svn repositories.
Good svn tutorials can be found at
http://artis.imag.fr/~Xavier.Decoret/resources/svn/
http://svnbook.red-bean.com/
Subscribe to:
Posts (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)