Get the ID of the last 5 draft posts for use in a shell script

``` sqleton wp ls-posts --type blog --status draft --limit 5 --select ID ```

Sections

Terminology & Glossary
πŸ“– Documentation
Navigation
35 sectionsv0.1
πŸ“„ Get the ID of the last 5 draft posts for use in a shell script β€” glaze help wp-ls-posts-select
wp-ls-posts-select

Get the ID of the last 5 draft posts for use in a shell script

``` sqleton wp ls-posts --type blog --status draft --limit 5 --select ID ```

Examplewordpressls-postswpstatustypelimitselect

To get only the IDs, to reuse them in another context (for example a shell script loop):

❯  sqleton wp ls-posts --type blog --status draft --limit 5 --select ID 
635239
76792
471151
262931
79536