Share your shell scripts here in this thread please, I'll keep updating this post :)
findq find filename in the system.
I call it findq as it saves me remembering and typing the whole command line, I use this on NS33
#!/bin/sh
# Check if the correct number of arguments is provide
if [ $# -ne 2 ]; then
echo "Usage: $0 file_to_find directory"
exit 1
fi
/usr/bin/find $2 -name "$1" -print
strinq find a string in a file and print the directory (need to add line # and offset), NS33
#!/bin/sh
#check if the correct number of arguments is provided
if [ $# -ne 2 ]; then
echo "Usage: $0 string [directory]"
exit 1
fi
string=$1
direc=$2
/usr/bin/find $direc -type f -name "*" -exec grep -l -i "$string" '{}' \; -print