Alert notification

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?










share|improve this question



























    up vote
    0
    down vote

    favorite












    I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?










      share|improve this question















      I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?







      bash shell






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 3 '16 at 22:12









      Anthon

      59.2k1798161




      59.2k1798161










      asked Mar 3 '16 at 22:02









      kvway

      1031




      1031




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          In C you can output the BEL character 'a'. In a script you can do so with:



          echo -e 'a'


          If you don't get a sound with that, be sure to check that there is no



          blacklist pcspkr


          in your /etc/modprobe.d/blacklist.conf (and if there is comment it out and reboot).



          Alternatively, if you have a nice sound short sound file xyz.mp3, and have vlc installed, you can do:



          cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3





          share|improve this answer






















          • Yeah but it does not make any sound i have already tried it just gives me newline
            – kvway
            Mar 3 '16 at 22:16










          • You can prevent the newline with -n but not getting the BEL to sound looks like a terminal setting problem to me.
            – Anthon
            Mar 3 '16 at 22:18










          • Yeah it may be any idea how to fix it?
            – kvway
            Mar 3 '16 at 22:19










          • Have you checked that your don't have blacklist pcspkr in your /etc/modprobe.d/blacklist.conf (if you do comment out and reboot)
            – Anthon
            Mar 3 '16 at 22:23










          • If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
            – Anthon
            Mar 3 '16 at 22:29

















          up vote
          2
          down vote













          If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:



          tput flash


          For most systems, tput accepts terminfo names including flash. The terminfo manual for ncurses says:



           flash_screen flash vb visible bell (may
          not move cursor)


          and



           If the terminal has a way of flashing the screen to indi-
          cate an error quietly (a bell replacement) then this can
          be given as flash; it must not move the cursor.


          A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM to xterm (but xterm itself works).






          share|improve this answer






















          • Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
            – kvway
            Mar 3 '16 at 22:24










          • What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
            – Thomas Dickey
            Mar 3 '16 at 22:26






          • 1




            I use xterm terminal
            – kvway
            Mar 3 '16 at 22:32










          • What does echo $XTERM_VERSION show?
            – Thomas Dickey
            Mar 3 '16 at 22:33










          • it shows an empty line
            – kvway
            Mar 3 '16 at 22:34

















          up vote
          0
          down vote













          how to get service start & stop alert through script






          share|improve this answer








          New contributor




          samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.

















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f267486%2falert-notification%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            In C you can output the BEL character 'a'. In a script you can do so with:



            echo -e 'a'


            If you don't get a sound with that, be sure to check that there is no



            blacklist pcspkr


            in your /etc/modprobe.d/blacklist.conf (and if there is comment it out and reboot).



            Alternatively, if you have a nice sound short sound file xyz.mp3, and have vlc installed, you can do:



            cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3





            share|improve this answer






















            • Yeah but it does not make any sound i have already tried it just gives me newline
              – kvway
              Mar 3 '16 at 22:16










            • You can prevent the newline with -n but not getting the BEL to sound looks like a terminal setting problem to me.
              – Anthon
              Mar 3 '16 at 22:18










            • Yeah it may be any idea how to fix it?
              – kvway
              Mar 3 '16 at 22:19










            • Have you checked that your don't have blacklist pcspkr in your /etc/modprobe.d/blacklist.conf (if you do comment out and reboot)
              – Anthon
              Mar 3 '16 at 22:23










            • If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
              – Anthon
              Mar 3 '16 at 22:29














            up vote
            1
            down vote



            accepted










            In C you can output the BEL character 'a'. In a script you can do so with:



            echo -e 'a'


            If you don't get a sound with that, be sure to check that there is no



            blacklist pcspkr


            in your /etc/modprobe.d/blacklist.conf (and if there is comment it out and reboot).



            Alternatively, if you have a nice sound short sound file xyz.mp3, and have vlc installed, you can do:



            cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3





            share|improve this answer






















            • Yeah but it does not make any sound i have already tried it just gives me newline
              – kvway
              Mar 3 '16 at 22:16










            • You can prevent the newline with -n but not getting the BEL to sound looks like a terminal setting problem to me.
              – Anthon
              Mar 3 '16 at 22:18










            • Yeah it may be any idea how to fix it?
              – kvway
              Mar 3 '16 at 22:19










            • Have you checked that your don't have blacklist pcspkr in your /etc/modprobe.d/blacklist.conf (if you do comment out and reboot)
              – Anthon
              Mar 3 '16 at 22:23










            • If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
              – Anthon
              Mar 3 '16 at 22:29












            up vote
            1
            down vote



            accepted







            up vote
            1
            down vote



            accepted






            In C you can output the BEL character 'a'. In a script you can do so with:



            echo -e 'a'


            If you don't get a sound with that, be sure to check that there is no



            blacklist pcspkr


            in your /etc/modprobe.d/blacklist.conf (and if there is comment it out and reboot).



            Alternatively, if you have a nice sound short sound file xyz.mp3, and have vlc installed, you can do:



            cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3





            share|improve this answer














            In C you can output the BEL character 'a'. In a script you can do so with:



            echo -e 'a'


            If you don't get a sound with that, be sure to check that there is no



            blacklist pcspkr


            in your /etc/modprobe.d/blacklist.conf (and if there is comment it out and reboot).



            Alternatively, if you have a nice sound short sound file xyz.mp3, and have vlc installed, you can do:



            cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 3 '16 at 22:47

























            answered Mar 3 '16 at 22:14









            Anthon

            59.2k1798161




            59.2k1798161











            • Yeah but it does not make any sound i have already tried it just gives me newline
              – kvway
              Mar 3 '16 at 22:16










            • You can prevent the newline with -n but not getting the BEL to sound looks like a terminal setting problem to me.
              – Anthon
              Mar 3 '16 at 22:18










            • Yeah it may be any idea how to fix it?
              – kvway
              Mar 3 '16 at 22:19










            • Have you checked that your don't have blacklist pcspkr in your /etc/modprobe.d/blacklist.conf (if you do comment out and reboot)
              – Anthon
              Mar 3 '16 at 22:23










            • If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
              – Anthon
              Mar 3 '16 at 22:29
















            • Yeah but it does not make any sound i have already tried it just gives me newline
              – kvway
              Mar 3 '16 at 22:16










            • You can prevent the newline with -n but not getting the BEL to sound looks like a terminal setting problem to me.
              – Anthon
              Mar 3 '16 at 22:18










            • Yeah it may be any idea how to fix it?
              – kvway
              Mar 3 '16 at 22:19










            • Have you checked that your don't have blacklist pcspkr in your /etc/modprobe.d/blacklist.conf (if you do comment out and reboot)
              – Anthon
              Mar 3 '16 at 22:23










            • If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
              – Anthon
              Mar 3 '16 at 22:29















            Yeah but it does not make any sound i have already tried it just gives me newline
            – kvway
            Mar 3 '16 at 22:16




            Yeah but it does not make any sound i have already tried it just gives me newline
            – kvway
            Mar 3 '16 at 22:16












            You can prevent the newline with -n but not getting the BEL to sound looks like a terminal setting problem to me.
            – Anthon
            Mar 3 '16 at 22:18




            You can prevent the newline with -n but not getting the BEL to sound looks like a terminal setting problem to me.
            – Anthon
            Mar 3 '16 at 22:18












            Yeah it may be any idea how to fix it?
            – kvway
            Mar 3 '16 at 22:19




            Yeah it may be any idea how to fix it?
            – kvway
            Mar 3 '16 at 22:19












            Have you checked that your don't have blacklist pcspkr in your /etc/modprobe.d/blacklist.conf (if you do comment out and reboot)
            – Anthon
            Mar 3 '16 at 22:23




            Have you checked that your don't have blacklist pcspkr in your /etc/modprobe.d/blacklist.conf (if you do comment out and reboot)
            – Anthon
            Mar 3 '16 at 22:23












            If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
            – Anthon
            Mar 3 '16 at 22:29




            If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
            – Anthon
            Mar 3 '16 at 22:29












            up vote
            2
            down vote













            If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:



            tput flash


            For most systems, tput accepts terminfo names including flash. The terminfo manual for ncurses says:



             flash_screen flash vb visible bell (may
            not move cursor)


            and



             If the terminal has a way of flashing the screen to indi-
            cate an error quietly (a bell replacement) then this can
            be given as flash; it must not move the cursor.


            A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM to xterm (but xterm itself works).






            share|improve this answer






















            • Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
              – kvway
              Mar 3 '16 at 22:24










            • What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
              – Thomas Dickey
              Mar 3 '16 at 22:26






            • 1




              I use xterm terminal
              – kvway
              Mar 3 '16 at 22:32










            • What does echo $XTERM_VERSION show?
              – Thomas Dickey
              Mar 3 '16 at 22:33










            • it shows an empty line
              – kvway
              Mar 3 '16 at 22:34














            up vote
            2
            down vote













            If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:



            tput flash


            For most systems, tput accepts terminfo names including flash. The terminfo manual for ncurses says:



             flash_screen flash vb visible bell (may
            not move cursor)


            and



             If the terminal has a way of flashing the screen to indi-
            cate an error quietly (a bell replacement) then this can
            be given as flash; it must not move the cursor.


            A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM to xterm (but xterm itself works).






            share|improve this answer






















            • Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
              – kvway
              Mar 3 '16 at 22:24










            • What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
              – Thomas Dickey
              Mar 3 '16 at 22:26






            • 1




              I use xterm terminal
              – kvway
              Mar 3 '16 at 22:32










            • What does echo $XTERM_VERSION show?
              – Thomas Dickey
              Mar 3 '16 at 22:33










            • it shows an empty line
              – kvway
              Mar 3 '16 at 22:34












            up vote
            2
            down vote










            up vote
            2
            down vote









            If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:



            tput flash


            For most systems, tput accepts terminfo names including flash. The terminfo manual for ncurses says:



             flash_screen flash vb visible bell (may
            not move cursor)


            and



             If the terminal has a way of flashing the screen to indi-
            cate an error quietly (a bell replacement) then this can
            be given as flash; it must not move the cursor.


            A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM to xterm (but xterm itself works).






            share|improve this answer














            If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:



            tput flash


            For most systems, tput accepts terminfo names including flash. The terminfo manual for ncurses says:



             flash_screen flash vb visible bell (may
            not move cursor)


            and



             If the terminal has a way of flashing the screen to indi-
            cate an error quietly (a bell replacement) then this can
            be given as flash; it must not move the cursor.


            A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM to xterm (but xterm itself works).







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 3 '16 at 22:32

























            answered Mar 3 '16 at 22:20









            Thomas Dickey

            50.6k587159




            50.6k587159











            • Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
              – kvway
              Mar 3 '16 at 22:24










            • What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
              – Thomas Dickey
              Mar 3 '16 at 22:26






            • 1




              I use xterm terminal
              – kvway
              Mar 3 '16 at 22:32










            • What does echo $XTERM_VERSION show?
              – Thomas Dickey
              Mar 3 '16 at 22:33










            • it shows an empty line
              – kvway
              Mar 3 '16 at 22:34
















            • Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
              – kvway
              Mar 3 '16 at 22:24










            • What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
              – Thomas Dickey
              Mar 3 '16 at 22:26






            • 1




              I use xterm terminal
              – kvway
              Mar 3 '16 at 22:32










            • What does echo $XTERM_VERSION show?
              – Thomas Dickey
              Mar 3 '16 at 22:33










            • it shows an empty line
              – kvway
              Mar 3 '16 at 22:34















            Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
            – kvway
            Mar 3 '16 at 22:24




            Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
            – kvway
            Mar 3 '16 at 22:24












            What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
            – Thomas Dickey
            Mar 3 '16 at 22:26




            What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
            – Thomas Dickey
            Mar 3 '16 at 22:26




            1




            1




            I use xterm terminal
            – kvway
            Mar 3 '16 at 22:32




            I use xterm terminal
            – kvway
            Mar 3 '16 at 22:32












            What does echo $XTERM_VERSION show?
            – Thomas Dickey
            Mar 3 '16 at 22:33




            What does echo $XTERM_VERSION show?
            – Thomas Dickey
            Mar 3 '16 at 22:33












            it shows an empty line
            – kvway
            Mar 3 '16 at 22:34




            it shows an empty line
            – kvway
            Mar 3 '16 at 22:34










            up vote
            0
            down vote













            how to get service start & stop alert through script






            share|improve this answer








            New contributor




            samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





















              up vote
              0
              down vote













              how to get service start & stop alert through script






              share|improve this answer








              New contributor




              samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.



















                up vote
                0
                down vote










                up vote
                0
                down vote









                how to get service start & stop alert through script






                share|improve this answer








                New contributor




                samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                how to get service start & stop alert through script







                share|improve this answer








                New contributor




                samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 16 mins ago









                samyak

                1




                1




                New contributor




                samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                samyak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f267486%2falert-notification%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?