Useful CLI tools (bash) for Arch Linux administration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
418 B

#!/bin/bash
###########################################################
# Grep/List matching strings in a specific folder
if [ -z "$1" ]; then
$1=/ #If folder not specified, then we use root folder as a starting path
fi
if [ -z "$2" ]; then #If string not defined, then...
# display usage if no string is given
echo "Usage: findmatch <folder_path> <string>"
return 1
else
ls $1 |grep -i "$2"
fi