You can use the KEGG API:
ko_list="ko00010 ko00030 ko00061 ko00120 ko00121
ko00190 ko00195 ko00230 ko00250 ko00253
ko00270 ko00300 ko00330 ko00400 ko00401
ko00410 ko00430 ko00450 ko00460 ko00471
ko00472 ko00500 ko00511 ko00520 ko00521
ko00523 ko00531 ko00550 ko00562 ko00604
ko00620 ko00625 ko00640"
for i in ${ko_list}
do
hit=$(curl -# http://rest.kegg.jp/list/pathway | grep -w "${i/ko/map}")
echo -e "${i}\t${hit}" | cut -f1,3 >> ko_pathways.txt
done
Or if your list is too long you can change the input and use a file with a list of ids.
while read line
do
hit=$(curl -# http://rest.kegg.jp/list/pathway | grep -w "${line/ko/map}")
echo -e "${line}\t${hit}" | cut -f1,3 >> ko_pathways.txt
done < ko_list.txt
The result will be something like:
ko00010 Glycolysis / Gluconeogenesis
ko00030 Pentose phosphate pathway
ko00061 Fatty acid biosynthesis
ko00120 Primary bile acid biosynthesis
ko00121 Secondary bile acid biosynthesis