I have gotten the wrapper script 'hhighlighter' from https://github.com/paoloantinori/hhighlighter which colors anything you want in stdout. I followed the instructions about installing ack-grep, created alias for ack=ack-grep in ~/.bashrc, put the h() function in ~/.bashrc, everything works fine when typing in the terminal. But when putting the EXACT same commands in a bash script, it says command not found. I will give examples here...
root@kali:~# echo "abcd" | h a b c d abcd
Here is what my script looks like
#!/bin/bash echo "abcd" | h a b c d
Exactly like the command typed in, but here is the output when running the script
root@kali:~# ./test.sh ./test.sh: line 1: h: command not found
How could this work when typing directly in the terminal, but not when having the exact same command in a bash script? If my ~/.bashrc is needed or anything else is needed to solve this please let me know, its been going on 4 days now without figuring this out.