Commit f041a36e authored by frozar's avatar frozar

[DEV] Fix help string and the 'get_subroutine.sh' script.

parent c393f38f
......@@ -3,7 +3,7 @@
usage(){
# display the number of argument given
# echo $#
echo " Usage:" $0 "<file_name> <subroutine_name>"
echo " Usage:" $0 "<file_name> <type_name>"
}
if [ $# -ne 2 ]
......
......@@ -22,12 +22,12 @@ outfile=l_s_${sub}
for f in ${files[*]}
do
echo " ====== $f"
beg=`grep -ni -e "^ *subroutine *${sub}_" -e "^ *end *subroutine" $f | grep -i -e "^[0-9]*: *subroutine *$sub" -A1 | head -n1 | cut -d":" -f1`
end=`grep -ni -e "^ *subroutine *${sub}_" -e "^ *end *subroutine" $f | grep -i -e "^[0-9]*: *subroutine *$sub" -A1 | tail -n1 | cut -d":" -f1`
beg=`grep -ni -e "^ *subroutine *${sub}" -e "^ *end *subroutine" $f | grep -i -e "^[0-9]*: *subroutine *$sub" -A1 | head -n1 | cut -d":" -f1`
end=`grep -ni -e "^ *subroutine *${sub}" -e "^ *end *subroutine" $f | grep -i -e "^[0-9]*: *subroutine *$sub" -A1 | tail -n1 | cut -d":" -f1`
head -n $end $f | tail -n $((${end}-${beg}+1))
echo " ====== END $f"
echo ""
done
) > $outfile
echo "INFO: $f produced"
echo "INFO: $outfile produced"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment