Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
script_factory
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fabien Rozar
script_factory
Commits
2909c463
Commit
2909c463
authored
Feb 18, 2016
by
frozar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] Add another script.
parent
5454f6a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
get_called_subroutine_from_outside.sh
get_called_subroutine_from_outside.sh
+29
-0
No files found.
get_called_subroutine_from_outside.sh
0 → 100755
View file @
2909c463
#!/bin/bash
usage
(){
# display the number of argument given
# echo $#
echo
" Usage:"
$0
"<src_file> <root_dir> <exclude_dir>"
}
if
[
$#
-ne
3
]
then
usage
exit
-1
fi
src_file
=
$1
root_dir
=
$2
exclude_dir
=
$3
l_sub
=
$(
grep
-i
"subroutine"
${
src_file
}
|
grep
-vi
"end *subr"
|
sed
"s/ *subroutine *//g;s/(.*//g"
|
grep
-v
"^!"
)
for
s
in
${
l_sub
}
do
cmd
=
`
grep
-rni
"call *
${
s
}
"
${
root_dir
}
|
grep
-v
${
exclude_dir
}
`
if
[
"
${
cmd
}
"
!=
''
]
then
echo
"
${
s
}
"
fi
done
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