'how to find letter a as first and c as penultimate letter in linux

I have tried this but i'm not sure if it works. senate, pizza, project, train, pact, palpatineDiscs, ambient, prizes These are the words. I tried is that the answer ?

ls p*c*; 


Solution 1:[1]

Try this:

ls | grep "^p" | grep c.$

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Juranir Santos