Code: Select all
guest@porteus:~$ lsxzmgrep
bash: lsxzmgrep: command not found
guest@porteus:~$ lsxzmgrep /home/guest .sh
bash: lsxzmgrep: command not found
guest@porteus:~$
Code: Select all
guest@porteus:~$ lsxzmgrep
bash: lsxzmgrep: command not found
guest@porteus:~$ lsxzmgrep /home/guest .sh
bash: lsxzmgrep: command not found
guest@porteus:~$
I don't see a syntax error of lsxzmgrep . Enlighten me where such error message printed by lsxzmgrep is , since this is what I wrote in my post above.Ed_P wrote: ↑14 Jan 2019, 06:12Like this.Code: Select all
guest@porteus:~$ lsxzmgrep bash: lsxzmgrep: command not found guest@porteus:~$ lsxzmgrep /home/guest .sh bash: lsxzmgrep: command not found guest@porteus:~$
You are free to help.Ed_P wrote: ↑14 Jan 2019, 06:12How are you doing on your vulnerabilities project? Vulnerability scanners
Code: Select all
#!/bin/bash
# Rava: https://forum.porteus.org/viewtopic.php?f=140&t=8143#p68189
for module in $(find $1 -type f -name "*.xzm"); do
lsxzm ${module} | grep "$2" | sed -r "s#.+#${module}\n&#"
done
Before the "for" one could add:
Code: Select all
if [ "$1" == "" ] || [ "$2" == "" ]; then
echo "lsxzmgrep [path] [grep-pattern]"
read
exit
fi