#! /bin/sh NowDateTime=$(date +%Y%m%d%H%M%s) mkdir -p $NowDateTime cp Makefile $NowDateTime/ cd $NowDateTime vim test.c if [ ! -f test.c ] then cd .. rm -r $NowDateTime fi