Hello, On Fri, 12 Jul 2024 at 06:57, Gaurav Pant via plug-mail <plug-mail@plug.org.in> wrote: > > Hi, > > On Thu, Jul 11, 2024 at 10:15 PM Amey via plug-mail <plug-mail@plug.org.in> > wrote: >> >> Hello, >> >> I am using curl with a complex combination after a long time. >> >> The command: curl -s >> http://localhost:9200/_snapshot/opensearch-dev/_all/ | jq '.[] | >> sort_by(.fieldname)' | grep -oE 'snapshot[_]?[0-9]+' >> > > Can you share the output without the pipes and filters? Difficult to say > what is going on without the actual data.
Sure. Command: curl -s http://localhost:9200/_snapshot/opensearch-dev/_all/ Output example with 2 snapshots: user@laptop:/tmp$ curl -s http://localhost:9200/_snapshot/opensearch-dev/_all/ {"snapshots":[{"snapshot":"20240703","uuid":"JSDDdKQ7TAWv37sGiOZ4Ng","version_id":135249127,"version":"1.3.13","indices":["report1","report2","report3"],"data_streams":[],"include_global_state":false,"state":"SUCCESS","start_time":"2024-07-03T10:37:32.742Z","start_time_in_millis":1720003052742,"end_time":"2024-07-03T10:38:23.775Z","end_time_in_millis":1720003103775,"duration_in_millis":51033,"failures":[],"shards":{"total":10,"failed":0,"successful":10}},{"snapshot":"202407120000","uuid":"9lLbVl7YRZCsl4BwCX07LQ","version_id":135249127,"version":"1.3.13","indices":["report1","report2","report3"],"data_streams":[],"include_global_state":false,"state":"SUCCESS","start_time":"2024-07-12T00:00:04.615Z","start_time_in_millis":1720742404615,"end_time":"2024-07-12T00:00:07.417Z","end_time_in_millis":1720742407417,"duration_in_millis":2802,"failures":[],"shards":{"total":10,"failed":0,"successful":10}}]} > >> >> The output: >> snapshot_20240703 >> snapshot_20240703 >> snapshot_20240705 >> snapshot_202407051028 >> snapshot_202407050847 >> snapshot_202407051101 >> snapshot_202407051141 >> snapshot_202407051142 >> >> But there are more snapshots in the same list with name's = >> 202407090000 , 202407100000 , 202407110000 >> Original value format = ["snapshot": "202407110000",] >> >> The script is unable to display these snapshots in the list. >> What can be the possible issue? Is it the 4 zero's at the end? >> Any hints? Thanks. >> >> Regards, >> Amey. >> _______________________________________________ >> plug-mail mailing list >> plug-mail@plug.org.in >> http://list.plug.org.in/listinfo/plug-mail > > > > -- > Gaurav Pant > ------------------------------------------- > http://OpenSourceCook.in > If you can cook, you can code. > _______________________________________________ > plug-mail mailing list > plug-mail@plug.org.in > http://list.plug.org.in/listinfo/plug-mail _______________________________________________ plug-mail mailing list plug-mail@plug.org.in http://list.plug.org.in/listinfo/plug-mail