[GH-ISSUE #293] How to convert a recording to STDIN commands? #813

Closed
opened 2026-03-15 10:34:09 +03:00 by kerem · 2 comments
Owner

Originally created by @gregsifr on GitHub (Apr 8, 2018).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/293

How to convert a cast to STDIN commands so that a cast could be converted into a script which could be run?

According to instructions in README.md a recording can be converted to text using asciinema cat existing.cast >output.txt. This however records all STDIN/STDOUT/STDERR. How to convert it so that only STDIN is returned?

Originally created by @gregsifr on GitHub (Apr 8, 2018). Original GitHub issue: https://github.com/asciinema/asciinema/issues/293 How to convert a cast to STDIN commands so that a cast could be converted into a script which could be run? According to instructions in ` README.md ` a recording can be converted to text using `asciinema cat existing.cast >output.txt`. This however records all STDIN/STDOUT/STDERR. How to convert it so that only STDIN is returned?
kerem closed this issue 2026-03-15 10:34:14 +03:00
Author
Owner

@ku1ik commented on GitHub (Apr 8, 2018):

You can use --stdin switch to include stdin stream in recorded asciicast. Then you can run it through grep '"i"' to leave only stdin events. Then some awk magic could convert it to a script.

<!-- gh-comment-id:379571849 --> @ku1ik commented on GitHub (Apr 8, 2018): You can use `--stdin` switch to include stdin stream in recorded asciicast. Then you can run it through `grep '"i"'` to leave only stdin events. Then some awk magic could convert it to a script.
Author
Owner

@gregsifr commented on GitHub (Apr 9, 2018):

That works great thanks 👍

<!-- gh-comment-id:379607638 --> @gregsifr commented on GitHub (Apr 9, 2018): That works great thanks :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#813
No description provided.