Updating File Contents
Since the file is now called
hello_world, let’s change the content as well, into
print('Hello, World!'). Okay, so this is pretty much the same as before, where we just
echo the command that we want and then redirect (
>) it into
I use tab auto-complete again there to just put less typing, and this will actually overwrite everything in that file. So if I press Enter now and
cat hello_world.py, you’ll see that the content is now slightly different according to what we echoed into it.
Become a Member to join the conversation.