This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Bash script syntax

Tags: None
(comma "," separated)
dzon
Registered Member
Posts
493
Karma
3

Bash script syntax

Wed Aug 10, 2022 8:21 am
I'm a bit lost here. I'm trying to figure out why this script doesn't work. The command "pdfgrep -r --include "*.pdf" whatever, works fine in a terminal. Yet I can't get it to run using this:

#!/bin/bash

read -p "Enter the search pattern..." pattern
if [ -f "$pattern" ]
then
result=$(grep -i "$pattern" )
echo "$result"
fi


This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]