APL/SCR1.2/TP07/bin2dot-with-for.sh
2021-11-16 15:32:33 +01:00

25 lines
333 B
Bash

#!/bin/bash
if [[ $# -lt 2]]
then
echo "usage:bin2dot-with-for <SRC_FILE> <DEST_FILE>"
exit
fi
if [[-f $1]]
then
echo "Arg1 must be a regular file"
exit
fi
if [[-f $2]]
then
echo "File $2 already exit ! Overwrite ? (Yes/No) :"
read answer
if [[$answer != "Yes"]]
then exit
fi
cp /dev/null $2
fi
ligne = $(at $1)
for i in $lignes
do