First, I'm sorry for my inglish becaause I don't know the correct name for "`" (backticks)
On SQL dump files I need extract blocks on database dumps, and all database start with code below and his sql dump end with next block for other database,
--
-- Current Database: `current_database`
--
// some sql code
--
-- Current Database: `next_database`
--
for d in $(cat file_with_databasesnames.txt);do echo $d;LC_ALL=C sed -n '/^-- Current Database: `database_name`/,/^-- Current Database: `/p' mysqldump.sql > $d.sql
On code I need pass value of $d instead database_name
I try several ways but all fails.
`${d}`
`$d`
\`$d\`
I use
bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
Copyright (C) 2007 Free Software Foundation, Inc.
Edited after close for duplicate.
Are backticks same that single quotes ? I think no.