<jupyter_start><jupyter_text>Introductionipylivebash is module to run shell script with live output<jupyter_code>import ipylivebash
%%livebash
# Live Output Demonstration
# It will show Hello World one by one continuously with 0.1s pause.

for i in {1..5}
do
  echo Hello World ${i}!
  sleep 0.1
done
%%livebash --help


%%livebash --save log.txt

echo Save output to a file
%%livebash --save log.txt --save-timestamp

echo Save output a file and add timestamp to the filename
%%livebash --ask-confirm

echo It will ask for confirmation before running this script
%%livebash --height 20
# Set the height of the display cell (Unit: no. of lines)

for i in {1..50}
do
  echo Line: ${i}!
done
%%livebash --notify

echo It will send a notification when the script finishes
%%livebash --line-limit 10

for i in {1..50}
do
  echo Line: ${i}!
  sleep 0.1
done
%%livebash --keep-cell-output

#By default, the content displaoy via livebash is not perverse. Use this options to save the content in the notebook
#But option like --line-limit will not works

echo Savable content<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08842297174111212, 'fraction_numerical': 0.016408386508659983, 'mean_word_length': 3.945945945945946, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '319595', 'license': 'BSD-3-Clause-Clear', 'n_tokens_mistral': 367, 'n_tokens_neox': 342, 'n_words': 158, 'path': 'examples/introduction.ipynb', 'repo_name': 'benlau/ipylivebash', 'size': '1097'}