Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Fabien Rozar
script_factory
Commits
f041a36e
Commit
f041a36e
authored
Feb 18, 2016
by
frozar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] Fix help string and the 'get_subroutine.sh' script.
parent
c393f38f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
delete_type.sh
delete_type.sh
+1
-1
get_subroutine.sh
get_subroutine.sh
+3
-3
No files found.
delete_type.sh
View file @
f041a36e
...
...
@@ -3,7 +3,7 @@
usage
(){
# display the number of argument given
# echo $#
echo
" Usage:"
$0
"<file_name> <
subroutin
e_name>"
echo
" Usage:"
$0
"<file_name> <
typ
e_name>"
}
if
[
$#
-ne
2
]
...
...
get_subroutine.sh
View file @
f041a36e
...
...
@@ -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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment