Shell script to get PIDs from schedules

Jeremy Nicoll - ml get_iplayer jn.ml.gti.91 at wingsandbeaks.org.uk
Sun Nov 2 10:58:15 PST 2014


Sharon Kimble <boudiccas at skimble.plus.com> wrote:


>Thanks for this Charles. With your last command
>
>--8<---------------cut here---------------start------------->8---
>wget -q -O -
http://www.bbc.co.uk/radio4/programmes/schedules/fm/this_week.json | jq '.[]
| .[] | .[] | .[] | .programme as $P |
$P.display_titles.title,$P.short_synopsis,$P.pid' | tail - 6
>
>--8<---------------cut here---------------end--------------->8---
>
>It is failing for me  saying
>
>╭────
>│parse error: Invalid numeric literal at line 1, column 10
>╰────
>
>Presumably its referring to "-O", but what should it be please to
>get it working properly?

Are you sure that the " tail - 6" is right?  It looks different from the
OP's "| tail -n 6"

Though if that's the problem I don't quite see why the parse error would
mention column 10.

Do the separate stages of the command work for you, before pipelineing them
together?

-- 
Jeremy Nicoll - my opinions are my own.



More information about the get_iplayer mailing list