APL/APL1.2/SCR1.2/TP07/bin2dot-with-for.sh
2021-11-30 15:07:19 +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