Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

${v#pat} vs ${v%pat}

This comparison card contrasts ${v#pat} and ${v%pat}. ${v#pat} is described as cuts from the front. ${v%pat} is described as cuts from the end. The card pairs ${v#pat} with file name, strip prefix, and ${v%pat} with folder, drop extension.

${v#pat} vs ${v%pat}: Cuts from the front.; Cuts from the end.
${v#pat} vs ${v%pat} · Download PNG
Read card text

What this card says

Trim

${v#pat}

Cuts from the front.

${v%pat}

Cuts from the end.

Key points

Double it for longest.

Double it for longest.

Example

${path##*/}

Use when

File name, strip prefix.

Folder, drop extension.

See all AWS revision cards