#! /usr/bin/env bash # $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/hs94.cs-32x32x5/input.impIGW/prepare_run,v 1.1 2011/02/22 14:52:29 jmc Exp $ # $Name: $ #- in order to save disc space, take files: fileList="dxC1_dXYa.face001.bin dxC1_dXYa.face002.bin dxC1_dXYa.face003.bin dxC1_dXYa.face004.bin dxC1_dXYa.face005.bin dxC1_dXYa.face006.bin" #- from this dir: fromDir="../../fizhi-cs-32x32x40/input" #- and do a symbolic link in the current directory # (if the file does not already exist) if test -d $fromDir ; then lnkList='files:' for xx in $fileList do if test -r ${fromDir}/$xx ; then if test ! -r $xx ; then lnkList=${lnkList}" "$xx ln -sf ${fromDir}/$xx . fi fi done echo ' link' $lnkList "from dir:" $fromDir else echo " Error:" $fromDir "not a directory" fi