I am trying to run a code in jupyter notebook Python3 see below:
%% bash
rm rvd2.txt
rm rvd22.txt
rm lsfdout.lsf
cat wrench.txt | sed 's/[[:space:]]/\n/g' | sed 's/^[ \t]*//' |
sed 's/[ \t]*$//' | \
sed '/^$/d'| tr -cd '[:alnum:] [:space:]' >> rvd2.txt
awk 'length>3' < rvd2.txt > rvd22.txt
cat rvd22.txt | sort | uniq -c | sort -nr | head -n 250 > lsfdout.lsf
The error I get is this,
File "<ipython-input-33-7c6457f6d2eb>", line 2
%% bash
^
SyntaxError: invalid syntax
I am totally out of clue why this happens, as a multiline code is supposed to be using double percent sign before bash