I need the correct commands for "adding a blank line after my previous commands output" and "displaying a message on screen indicating the script is done running. For adding a blank line I've tried "echo" after the command but it doesn't work.
#!/bin/bash
echo "Hello World!!"
echo
echo
echo "Hello World!!"
I'm trying to add a space (blank line) between the outputs as you see in the attachment. Attachment includes what I got vs what it should look like. Also, do you have a command for displaying a message. Thanks!What have you tried? This seems to work:
Otherwise you can give an example of what you are trying to do?Code:#!/bin/bash echo "Hello World!!" echo echo echo "Hello World!!"
command1
echo
command2
command1
is the command getting your first bit of outputcommand2
is your other command.echo
command will just create an empty line between the output from the first command and the output of the second.( command1 && command2 ) > /path/to/output-file
( command1 && echo && command2 ) > /path/to/file
echo
command at the end of your script.echo "Script $0 has finished!"
notify-send
comes immediately to mind.notify-send
in your script simply add this as the last line of your script:notify-send "Script $0 - has finished!"
xmessage
.xmessage
should be in the repos of most distros.xmessage -timeout 2 -nearmouse "Script $0 has finished!"
xmessage
.