-3
 echo "Please, Type an existing title what you want to read: "
 read item_name
 item_name=${item_name,,}
 find . -type f -name '$item_name*' 

How can I use the last line?

1 Answers1

0

Use double quotes to have the variable expanded:

find . -type f -name "$item_name*"
user1934428
  • 19,864
  • 7
  • 42
  • 87
  • And how can i use cat command after this? – Indrojit Mondal Aug 29 '22 at 12:58
  • The `cat` command doesn't care if you ran `find` before it, or at all. If you are trying to ask how to `cat` the found files, that's `find ... -exec cat {} +`. Going forward, please search before asking. – tripleee Aug 29 '22 at 13:03