Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-07-2016, 05:07 AM   #1
LQ Newbie
Registered: Dec 2014
Posts: 20

Rep: Reputation: Disabled
How to post that a command is completed on screen

Hi All
My setup is

ubuntu14.04 64 bit.

One beaglebone black board.

I flash the sd card using this command

dd if=./bonexxxx.img of=/dev/sdx

It takes some time say 15 minutes on my machine.

How can I post on screen a message such as

"command completed"

each time I run a command that takes more than 10 minutes.

Last edited by mrigendra; 07-07-2016 at 06:43 AM. Reason: added a screenshot.
Old 07-07-2016, 05:19 AM   #2
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,186

Rep: Reputation: 52
# dd if=./bonexxxx.img of=/dev/sdx && echo "Command Completed"
Old 07-07-2016, 05:20 AM   #3
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,668

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
do you mean something like this?
command && echo command completed
Old 07-07-2016, 06:46 AM   #4
LQ Newbie
Registered: Dec 2014
Posts: 20

Original Poster
Rep: Reputation: Disabled

Added a screenshot. So in place of "Connected wired connection2" It should say "<Command> completed"
May be its a script related question.
Old 07-07-2016, 07:48 AM   #5
Senior Member
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 2,472
Blog Entries: 3

Rep: Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099
If you have "zenity", "yad", "xmessage", or something similar, you can have a message pop up on your desktop.

dd if=./bonexxxx.img of=/dev/sdx && zenity --info
dd if=./bonexxxx.img of=/dev/sdx && zenity --notification --text="dd is done"
Old 07-07-2016, 08:44 AM   #6
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 3,247
Blog Entries: 1

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
You could try using ; instead of &&. The && is dependent on the previous "successfully" completing (return code 0). Which would have no prompting if it failed. I tend more towards something like this:

$ date +%Y%m%d_%H:%M:%S; command; date +%Y%m%d_%H:%M:%S; beep
But it depends on which part of what has teeth (actually changes stuff). For something that depends on the previous thing making changes, most certainly use &&.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] HELP ME! URGENT - Entered "exit" before previous command had completed run dajobi Linux - Newbie 3 03-18-2012 08:12 PM
Open Screen as Daemon Will not Execute Command Unless Screen is Opened redir Linux - Software 1 08-08-2011 07:36 PM
Command not completed successfully?? anishkumarv Linux - Newbie 2 07-29-2011 04:05 AM
printing my own message as each command in a bash script has completed successfully CoffeeKing!!! Linux - Newbie 9 01-26-2009 11:02 AM
Make a command timeout if not completed in a certain amount of time helptonewbie Linux - Server 2 10-18-2007 06:06 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration