Script to create shell aliases Can anybody find anything to pick apart in this script?

#  Copyright (c) 2019. Legorooj

import sys
import os

docstring = '''
add_alias [alias] [command]'''
if len(sys.argv) &lt;= 1:
    print(docstring)
else:
    alias, cmd = sys.argv[1], sys.argv[2]
    print('Adding alias...')
    os.system(f'echo "alias {alias}={cmd}" &gt;&gt; ~/.bashrc &amp;&amp; source ~/.bashrc')
    print('Alias added')


If ran like:

add_alias bob "echo bob", it adds an alias as if you ran 

echo "alias bob="echo bob"" &gt;&gt; ~/.bashrc &amp;&amp; source ~/.bashrc
We need to do some basic sanity checking of the inputs - alias names can't contain whitespace, for example, and any newlines in the expansion will be treated as the end of the alias definition (and the following text will then be a new command in your .bashrc).

The source ~/.bashrc in the call to os.system() looks pointless, as that shell terminates immediately after.