16 lines
242 B
Bash
Executable File
16 lines
242 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
qfile=$1
|
|
|
|
lines=$(cat $qfile | wc -l)
|
|
|
|
while [ $lines -ge 1 ]; do
|
|
entry=$(head -n 1 $qfile)
|
|
$entry
|
|
tail -n +2 $qfile > ${qfile}.tmp
|
|
mv ${qfile}.tmp ${qfile}
|
|
lines=$(cat $qfile | wc -l)
|
|
done
|
|
|
|
rm $qfile
|