25 lines
333 B
Bash
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
|