One of my pages happens to be titled "Season 3 nostalgia," and I wanted to revise post 3, "Scary Dairy." This is what happens:
Basically, nothing shows up in the text editor because lb has concatenated the titles of "Season 3 Nostalgia" with "Scary Dairy." This happens because of the command:
One of my pages happens to be titled "Season 3 nostalgia," and I wanted to revise post 3, "Scary Dairy." This is what happens:
Basically, nothing shows up in the text editor because lb has concatenated the titles of "Season 3 Nostalgia" with "Scary Dairy." This happens because of the command:
chosen="$(ls -rc "$1" -I '*[^".html"]' -I "index.html" | nl | grep -w " $number" | awk '{print $2}')"
where
grep -w "$number"
ends up selecting two pages at once:However, modifying the grep command to include a preceding space before $number:
grep -w " $number"
fixes the issue.