Would like help with trap command in Terminal

I'm learning about the trap command from my bash book. I tried out the little script they gave:
Code: 
trap "echo 'You hit control-C!' " INTwhile true; do     sleep 60done
But when I type control-c, the script just stops and the message is not displayed. I checked trap -l and saw that control-c is intr, but the same thing happened whet I tried that. Can anyone tell me what I'm missing?
I'm using terminal (BSD) in OS X Snow Leopard

I'm assuming that you are typing these commands in the terminal window and not initiating them thru a shell script. I'd like to suggest that you avoid infinite loops. Since you are bound to orphan processes. I'm going the use the external sleep command in my examples because it affords us some time to type CONTROL-C.
[bash-4.2.8]~ $ trap "echo '......You hit control-C'" INT; sleep 15
^C  
[bash-4.2.8]~ $
[bash-4.2.8]~ $ ^C......You hit control-C
The trap is set but Bash does not intercept the trap because sleep is running in the foreground. The interrupt signal is sent to the command sleep.
Let's try running sleep in the background ->
[bash-4.2.8]~ $ trap 2 #Set SIGINT to it's default
[bash-4.2.8]~ $ trap "echo '......You hit control-C'" INT; sleep 15&
[1] 368
[bash-4.2.8]~ $ ^C......You hit control-C
[bash-4.2.8]~ $ ^C......You hit control-C
[1]+  Done                    sleep 15
[bash-4.2.8]~ $ ^C......You hit control-C
It works! Well, almost. You can't send the interrupt signal to a background process. In order for Bash to intercept the trap it must stay in the foreground. This happens when you initiate a sub-shell via a shell script or by rapping a command in paretheses ( ) ->
[bash-4.2.8]~ $ trap 2  #Set SIGINT to it's default
[bash-4.2.8]~ $ (trap "echo '......You hit control-C'" INT; sleep 15) ^C......You hit control-C
[bash-4.2.8]~ $
[bash-4.2.8]~ $ ^C
The trap works and the interrupt signal was sent to sleep. Notice, the trap is only set in the sub-shell.
Bash behaves differently when you use the built-in commands since you are working within the shell. I'll use an example similar to one of yours, except that you can break out of the loop by typing the number 10 or higher.
[bash-4.2.8]~ $ trap "echo '.......You hit control-C'" INT ; x=0; while (( $x < 10 )); do echo "Enter a number"; read x; done
Enter a number
3
Enter a number
^C.......You hit control-C
3
Enter a number
10
[bash-4.2.8]~ $
[bash-4.2.8]~ $ ^C......You hit control-C
[bash-4.2.8]~ $ trap 2  #Set SIGINT to it's default
As you can see the trap works. I'm going to let you sort out what happens after I typed  CONTROL -C in the last example.....:-)  Hope this helps.
Message was edited by: Mark Jalbert

Similar Messages

  • Hi i would like help with:  When I draw circle and add stroke I can not see stroke  I use Photoshop CS 5

    Hi i would like help with:
    When I draw circle and add stroke I can not see stroke
    I use Photoshop CS 5

    Make sure the stroke is set to a color and not to the symbol that appears here for Fill

  • Would like help with hyperlink

    In a JEditorPane, HTML documents are displayed and when a
    hyperlink is clicked, they are loaded. However, I would like to display,
    in a status area, where the hyperlink points to before the mouse click
    activates it (goes to that new page). I tried adding a mouse motion
    listener but that didn't work. I'm not really sure why it didn't work but I
    suspect it was because the editor pane was non-editable.
    Any ideas on how to implement this?

    Is this a bug or has someone else been able to get access to what
    the hyperlink points to when the mouse is over the hyperlink and haven't
    mouse clicked yet?Try the following code extracted from my program at http://www.aokabc.com (it works on 1.4):
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    public class TPBugDemo extends JFrame{
        public TPBugDemo() throws Exception{
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          JEditorPane pane=new myJEditorPane();
         pane.setContentType("text/html");
         pane.setText("<A HREF='http://www.aokabc.com'>click me</A>");
          this.getContentPane().add(new JScrollPane(pane));
       public static void main(String args[]) throws Exception {
          TPBugDemo gI = new TPBugDemo();
          gI.setSize(400, 200);
          gI.setLocationRelativeTo(null);
          gI.setVisible(true);
       class myJEditorPane extends JEditorPane implements HyperlinkListener {
         public myJEditorPane() {
            super();
            setEditable(false);
            addHyperlinkListener(this);
         public void hyperlinkUpdate(HyperlinkEvent e) {
            if (e.getEventType()==HyperlinkEvent.EventType.ACTIVATED) {
              try {
                 setPage(e.getURL());
              } catch (Throwable t) {
                 System.out.println(t.toString());
            } else if (e.getEventType()==HyperlinkEvent.EventType.ENTERED) {          // simulate a hover effect (a CSS style not supported in 1.4.0)
              System.out.println(e.getURL());
              select(e.getSourceElement().getStartOffset(),e.getSourceElement().getEndOffset());
            } else if (e.getEventType()==HyperlinkEvent.EventType.EXITED) {
              select(e.getSourceElement().getStartOffset(),e.getSourceElement().getStartOffset());
    };o)
    V.V.

  • Would like help with treeset ,the codes that using for sorting, please ?

    hi every body. i faced a problem while writing this program, everything worked properly except this one. The program is related to Jframe and it asks the user to add three labels , three text field , one text area and three Jbuttons which are add sort and exit. i could deal with add and exit but sort, i couldn't do it properly because i don't know the codes that should be added in actionperfomed?
    These codes are :
    package gui;
    import javax.swing.SwingUtilities;
    import java.awt.BorderLayout;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import java.awt.Rectangle;
    import java.util.ArrayList;
    import javax.swing.JButton;
    import javax.swing.JTextField;
    import javax.swing.JTextArea;
    import sun.misc.Sort;
    import domain.Student;
    public class StudentFrame extends JFrame {
          * This method initializes btnAdd     
          * @return javax.swing.JButton     
         private JButton getBtnAdd() {
              if (btnAdd == null) {
                   btnAdd = new JButton();
                   btnAdd.setBounds(new Rectangle(13, 135, 59, 27));
                   btnAdd.setText("Add");
                   btnAdd.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                        btnAddClicked(); // TODO Auto-generated Event stub actionPerformed()
              return btnAdd;
         protected void btnAddClicked() {
              // TODO Auto-generated method stub
         String name = txtName.getText();
         String id = txtID.getText();
         String age = txtAge.getText();
         Student s = new Student(name , id , age);
         txtArea.setText(String.valueOf(s ));
          * This method initializes btnSort     
          * @return javax.swing.JButton     
         private JButton getBtnSort() {
              if (btnSort == null) {
                   btnSort = new JButton();
                   btnSort.setBounds(new Rectangle(95, 136, 62, 25));
                   btnSort.setText("Sort");
                   btnSort.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             btnSortClicked(); // TODO Auto-generated Event stub actionPerformed()
              return btnSort;
         protected void btnSortClicked() {
              // TODO Auto-generated method stub
          * This method initializes btnExit     
          * @return javax.swing.JButton     
         private JButton getBtnExit() {
              if (btnExit == null) {
                   btnExit = new JButton();
                   btnExit.setBounds(new Rectangle(173, 134, 61, 23));
                   btnExit.setText("Exit");
                   btnExit.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             System.exit(0); // TODO Auto-generated Event stub actionPerformed()
              return btnExit;
          * This method initializes txtName     
          * @return javax.swing.JTextField     
         private JTextField getTxtName() {
              if (txtName == null) {
                   txtName = new JTextField();
                   txtName.setBounds(new Rectangle(79, 11, 60, 23));
              return txtName;
          * This method initializes txtID     
          * @return javax.swing.JTextField     
         private JTextField getTxtID() {
              if (txtID == null) {
                   txtID = new JTextField();
                   txtID.setBounds(new Rectangle(73, 55, 65, 26));
              return txtID;
          * This method initializes txtAge     
          * @return javax.swing.JTextField     
         private JTextField getTxtAge() {
              if (txtAge == null) {
                   txtAge = new JTextField();
                   txtAge.setBounds(new Rectangle(74, 96, 61, 24));
              return txtAge;
          * This method initializes txtArea     
          * @return javax.swing.JTextArea     
         private JTextArea getTxtArea() {
              if (txtArea == null) {
                   txtArea = new JTextArea();
                   txtArea.setBounds(new Rectangle(138, 5, 154, 128));
              return txtArea;
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        StudentFrame thisClass = new StudentFrame();
                        thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        thisClass.setVisible(true);
          * This is the default constructor
         public StudentFrame() {
              super();
              initialize();
          * This method initializes this
          * @return void
         private void initialize() {
              this.setSize(300, 200);
              this.setContentPane(getJContentPane());
              this.setTitle("JFrame");
              return jContentPane;
    }Edited by: hypocrisy on Apr 26, 2009 6:51 PM

    There are three actionPerformed in that program.One for add Jbutton , Sort , and Exit
    the codes that i have added for add button after action performed are
    String name = txtName.getText();
    String id = txtID.getText();
    String age = txtAge.getText();
    Student s = new Student ( name , id , age);
    System.out.println(s);
    the codes for Exit button to make it works properly was :
    System.out.println(0);
    But when i came to Sort Button and i tried to enter many codes but it didn't sort properly so would you like to help me with the right codes :)

  • I would need help with the following please: I need to save some of my email on a disk. I was going to Print, then Save PDF but then I am stuck. Help please. Thanks. Elisabeth

    I would need help with saving some eamil messages to a disk to unclutter my email. How can I do this please?
    Thanks.
    Elisabeth

    Open the email and then from the File menu select Save As Rich Text Format. That'll save it to open in TextEdit. If you want a pdf then open the email and do command-p (Print) and then from the PDF drop down box lower left corner select Save as PDF.

  • I'm a newbee, (Win Tech)  Would like to know what command it is for reaching the reinstall menu at boot-up. I do not meen cmd r menu wich just install OSX above the OS. I think I need a totally fresh installation. Do you have any clue?

    I'm a newbee, (Win Tech)  Would like to know what command it is for reaching the reinstall menu at boot-up.
    I do not meen cmd r menu wich just install OSX above the OS. I think I need a totally fresh installation.
    Do you have any clue? Have several issues on a new MacBookPro but it's propably "PEBKAC" made.. 
    Uffe

    It is Command+r or for the online internet system it is Command+option/Alt+r keys. Then you use Disk Utility to erase the macintosh partition, from the built in recovery hd, or you can repartition the drive as one partition from the online system.
    To actually get to the online internet system you have to hold that key combo down until you see a globe on the screen. Otherwise it will just boot from the built in recovery hd on the internal drive.

  • Can anyone help with Double Command issues. This a specific keyboard question and they do not seem to know.

    Before I go into a lengthy explanation of the problem: Can anyone help with Double Command issues. This a specific keyboard question and they do not seem to know.
    Thanks much.
    Emile

    Choose Force Quit from the Apple menu and close Mail from there.
    (103661)

  • Help with Sort function in Terminal

    Hello all... this is my first post on here as I'm having some trouble with some Termianl commands. I'm trying to learn Terminal at the moment as it is but I would appreciate some help with this one....
    I'm trying to sort a rather large txt file into alphabetical order and also delete any duplicates. I've been using the following command in Terminal:
    sort -u words.txt > words1.txt
    but after a while I get the following error
    sort: string comparison failed: Illegal byte sequence
    sort: Set LC_ALL='C' to work around the problem.
    sort: The strings compared were `ariadnetr\345dens\r' and `ariadnetr\345ds\r'.
    What should my initial command be? What is Set LC_ALL='C'?
    Hope you guys can help?

    Various languages distinct sorting - collation - sequences. 
    The characters can and variously do sort differently, depending on what language is involved. 
    Languages here can include the written languages of humans, and a few settings associated with programming languages.  This is all part of what is known as internationalization and localization, and there are are various documents around on that topic.
    The LC_ALL environment variable sets all of the locale-related settings en-mass, including the collation sequence that is established via LC_COLLATE et al, and the sort tool is suggesting selecting the C language collation.
    Here, the tool is suggesting the following syntax:
    LC_ALL=C sort -u words.txt > words1.txt
    This can also be done by exporting the LC_ALL, but it's probably better to just do this locally before invoking the tool.
    Also look at the lines of text in question within the files, and confirm the character encoding of the file.
    Files can have different character encodings, and there's no reliable means to guess the encoding.  For some related information, see the file command:
    file words.txt
    ...and start reading some of the materials on internationalization and localization that are posted around the 'net. Here's Apple's top-level overview.
    In this case, it looks like there's an "odd" character and probably an å character on that line and apparently the Svenska ariadnetrådens. 
    Switching collation can help here, or - if the character is not necessary - removing it via tr or replacing it via sed can be equally effective solutions. 
    Given it appears to be Svenska, it might work better to switch to Svenska collation thanto  the suggested C collation.
    I think that's going to be sv_SE, which would make the command:
    LC_ALL=sv_SE sort -u words.txt > words1.txt
    This is all generic bash shell scripting stuff, and not specific to OS X.  If you haven't already seen them, the folks over at tldp have various guides including a bash guide for beginners, and an advanced bash scripting guide - both can be worth skimming.  They're not exactly the same as bash on OS X and some specific commands and switches can differ, and as bash versions can differ, but bash is quite similar across all the platforms.

  • Upgrade broke bluetooth - would like help diagnosing cause

    I ran two pacman -Syu cycles today and one or other (but I'm not sure which) has broken bluetooth. I would like, if possible, to figure out the most likely causes and whether there is anything which might have avoided this.
    A little background: bluetooth has always been dodgy on this machine. A BIOS upgrade helped but has not really resolved the issues under Linux. (Can't say about Windows as I don't use it.) Since the upgrade there is a reasonably certain way of restoring bluetooth but it is, frankly, a PITA. (It involves resetting BIOS to defaults which renders the machine unbootable as it wipes the EFI boot entry for grub. This is easily fixed but it is a pain to have to go through this all the time.)
    The issue is that bluetooth appears as hard blocked and nothing I've found short of the above reenables it.
    Here's pacman's log for today:
    [2012-10-28 00:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 00:01] synchronizing package lists
    [2012-10-28 00:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 00:17] synchronizing package lists
    [2012-10-28 01:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 01:01] synchronizing package lists
    [2012-10-28 01:05] Running 'pacman -Syu'
    [2012-10-28 01:05] synchronizing package lists
    [2012-10-28 01:05] starting full system upgrade
    [2012-10-28 01:07] upgraded firefox (16.0.1-1 -> 16.0.2-1)
    [2012-10-28 01:07] upgraded firefox-i18n-cy (16.0.1-1 -> 16.0.2-1)
    [2012-10-28 01:07] upgraded phonon (1:4.6.0-2 -> 1:4.6.0-3)
    [2012-10-28 01:07] upgraded wget (1.14-1 -> 1.14-2)
    [2012-10-28 01:07] Exited with code 0
    [2012-10-28 01:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 01:17] synchronizing package lists
    [2012-10-28 01:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 01:01] synchronizing package lists
    [2012-10-28 01:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 01:17] synchronizing package lists
    [2012-10-28 02:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 02:01] synchronizing package lists
    [2012-10-28 02:33] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 02:33] synchronizing package lists
    [2012-10-28 03:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 03:01] synchronizing package lists
    [2012-10-28 03:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 03:17] synchronizing package lists
    [2012-10-28 03:31] Running 'pacman -Syu'
    [2012-10-28 03:31] synchronizing package lists
    [2012-10-28 03:31] starting full system upgrade
    [2012-10-28 03:34] upgraded imagemagick (6.7.9.8-2 -> 6.8.0.3-1)
    [2012-10-28 03:34] upgraded calibre (0.9.4-1 -> 0.9.4-2)
    [2012-10-28 03:34] upgraded ilmbase (1.0.2-1 -> 1.0.3-1)
    [2012-10-28 03:34] upgraded openexr (1.7.1-1 -> 1.7.1-2)
    [2012-10-28 03:34] upgraded glew (1.8.0-2 -> 1.9.0-1)
    [2012-10-28 03:34] upgraded enblend-enfuse (4.0-7 -> 4.0-8)
    [2012-10-28 03:34] upgraded gambas3-runtime (3.3.3-2 -> 3.3.3-3)
    [2012-10-28 03:34] upgraded gambas3-devel (3.3.3-2 -> 3.3.3-3)
    [2012-10-28 03:34] upgraded gegl (0.2.0-4 -> 0.2.0-5)
    [2012-10-28 03:34] upgraded hugin (2011.4.0-6 -> 2011.4.0-7)
    [2012-10-28 03:34] upgraded imagemagick-doc (6.7.9.8-2 -> 6.8.0.3-1)
    [2012-10-28 03:35] upgraded inkscape (0.48.3.1-6 -> 0.48.3.1-7)
    [2012-10-28 03:35] upgraded kdelibs (4.9.2-2 -> 4.9.2-3)
    [2012-10-28 03:35] upgraded kdelibs3 (3.5.10-14 -> 3.5.10-15)
    [2012-10-28 03:35] upgraded obex-data-server (0.4.6-2 -> 0.4.6-3)
    [2012-10-28 03:35] upgraded xine-lib (1.2.2-2 -> 1.2.2-3)
    [2012-10-28 03:35] upgraded opencv (2.4.2-4 -> 2.4.2-5)
    [2012-10-28 03:35] upgraded pstoedit (3.60-2 -> 3.60-3)
    [2012-10-28 03:35] Exited with code 0
    [2012-10-28 16:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 16:01] synchronizing package lists
    [2012-10-28 17:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 17:01] synchronizing package lists
    [2012-10-28 17:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 17:17] synchronizing package lists
    [2012-10-28 18:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 18:01] synchronizing package lists
    [2012-10-28 18:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 18:17] synchronizing package lists
    [2012-10-28 19:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 19:01] synchronizing package lists
    [2012-10-28 19:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 19:17] synchronizing package lists
    [2012-10-28 20:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 20:01] synchronizing package lists
    [2012-10-28 20:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 20:17] synchronizing package lists
    [2012-10-28 20:32] Running 'pacman -Syu'
    [2012-10-28 20:32] synchronizing package lists
    [2012-10-28 20:33] starting full system upgrade
    [2012-10-28 20:37] upgraded linux-api-headers (3.5.5-1 -> 3.6.3-1)
    [2012-10-28 20:37] Generating locales...
    [2012-10-28 20:37] cy_GB.UTF-8... done
    [2012-10-28 20:37] cy_GB.ISO-8859-14... done
    [2012-10-28 20:37] en_GB.UTF-8... done
    [2012-10-28 20:37] en_GB.ISO-8859-1... done
    [2012-10-28 20:37] en_US.UTF-8... done
    [2012-10-28 20:37] en_US.ISO-8859-1... done
    [2012-10-28 20:37] Generation complete.
    [2012-10-28 20:37] upgraded glibc (2.16.0-4 -> 2.16.0-5)
    [2012-10-28 20:37] upgraded binutils-multilib (2.22-10 -> 2.23-1)
    [2012-10-28 20:37] upgraded colordiff (1.0.10-1 -> 1.0.12-1)
    [2012-10-28 20:37] upgraded lib32-glibc (2.16.0-4 -> 2.16.0-5)
    [2012-10-28 20:37] upgraded lib32-gcc-libs (4.7.2-1 -> 4.7.2-2)
    [2012-10-28 20:37] upgraded gcc-libs-multilib (4.7.2-1 -> 4.7.2-2)
    [2012-10-28 20:37] upgraded gcc-multilib (4.7.2-1 -> 4.7.2-2)
    [2012-10-28 20:37] upgraded monit (5.5-1 -> 5.5-2)
    [2012-10-28 20:37] upgraded powertop (2.1-1 -> 2.1.1-1)
    [2012-10-28 20:37] upgraded syslinux (4.05-7 -> 4.06-1)
    [2012-10-28 20:37] Exited with code 0
    [2012-10-28 20:46] Running 'pacman -U /home/software/packages/dropbox-cli-1-13-x86_64.pkg.tar.xz'
    [2012-10-28 20:46] upgraded dropbox-cli (1-12 -> 1-13)
    [2012-10-28 20:46] Exited with code 0
    [2012-10-28 21:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 21:01] synchronizing package lists
    [2012-10-28 21:17] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 21:17] synchronizing package lists
    [2012-10-28 22:01] Running 'pacman --dbpath /dev/shm/fakepacdb -Sy'
    [2012-10-28 22:01] synchronizing package lists
    I assume that obex-data-server is a plausible culprit but I'm not certain whether other things might be implicated such as glibc.
    systemctl shows this for bluetooth.service's status:
    bluetooth.service - Bluetooth service
    Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled)
    Active: active (running) since Sun, 2012-10-28 21:52:27 GMT; 17min ago
    Main PID: 415 (bluetoothd)
    CGroup: name=systemd:/system/bluetooth.service
    └ 415 /usr/sbin/bluetoothd -n
    Oct 28 21:52:20 <computername> bluetoothd[415]: Bluetooth daemon 4.101
    Oct 28 21:52:27 <computername> bluetoothd[415]: Starting SDP server
    Oct 28 21:52:29 <computername> bluetoothd[415]: Bluetooth Management interface initialized
    Oct 28 21:52:27 <computername> systemd[1]: Started Bluetooth service.
    Oct 28 21:52:30 <computername> bluetoothd[415]: bluetoothd[415]: Starting SDP server
    Oct 28 21:52:30 <computername> bluetoothd[415]: bluetoothd[415]: Bluetooth Management interface initialized
    errors.log includes these lines:
    Oct 28 15:36:28 localhost bluetoothd[447]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
    Oct 28 15:36:28 localhost bluetoothd[447]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
    journalctl includes:
    Oct 28 02:28:05 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (run/udev/data/+bluetooth:hci0)
    Oct 28 02:28:45 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/lib/modules/3.0.48-1-lts/kernel/net/bluetooth/)
    Oct 28 02:28:45 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/lib/modules/3.0.48-1-lts/kernel/net/bluetooth/bluetooth.ko.gz)
    Oct 28 02:28:45 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/lib/modules/3.0.48-1-lts/kernel/net/bluetooth/bnep/)
    Oct 28 02:28:45 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/lib/modules/3.0.48-1-lts/kernel/net/bluetooth/bnep/bnep.ko.gz)
    Oct 28 02:28:45 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/lib/modules/3.0.48-1-lts/kernel/net/bluetooth/hidp/)
    Oct 28 02:29:06 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/lib/systemd/system/bluetooth.target)
    Oct 28 02:30:48 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/share/mime/application/vnd.kde.bluedevil-audio.xml)
    Oct 28 02:30:48 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/share/mime/application/vnd.kde.bluedevil-input.xml)
    Oct 28 02:30:48 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/share/mime/application/vnd.kde.bluedevil-network-dun.xml)
    Oct 28 02:30:48 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/share/mime/application/vnd.kde.bluedevil-network-panu.xml)
    Oct 28 02:30:48 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (usr/share/mime/application/vnd.kde.bluedevil-sendfile.xml)
    Oct 28 02:32:29 <computername> /USR/SBIN/CROND[30610]: (root) CMDOUT (var/lib/bluetooth/***/config)
    Oct 28 15:36:24 <computername> systemd[1]: Service bluetooth.target is not needed anymore. Stopping.
    Oct 28 15:36:24 <computername> systemd[1]: Stopping Bluetooth.
    Oct 28 15:36:24 <computername> systemd[1]: Stopped target Bluetooth.
    Oct 28 15:36:24 <computername> systemd[1]: Starting Bluetooth.
    Oct 28 15:36:24 <computername> systemd[1]: Reached target Bluetooth.
    Oct 28 15:36:25 <computername> bluetoothd[447]: bluetoothd[447]: Adapter /org/bluez/447/hci0 has been disabled
    Oct 28 15:36:25 <computername> bluetoothd[447]: Adapter /org/bluez/447/hci0 has been disabled
    Oct 28 15:36:25 <computername> bluetoothd[447]: Unregister path: /org/bluez/447/hci0
    Oct 28 15:36:25 <computername> bluetoothd[447]: bluetoothd[447]: Unregister path: /org/bluez/447/hci0
    Oct 28 15:36:25 <computername> bluetoothd[447]: bluetoothd[447]: input-headset driver probe failed for device ***
    Oct 28 15:36:25 <computername> bluetoothd[447]: input-headset driver probe failed for device ***
    Oct 28 15:36:25 <computername> bluetoothd[447]: Adapter /org/bluez/447/hci0 has been enabled
    Oct 28 15:36:25 <computername> bluetoothd[447]: bluetoothd[447]: Adapter /org/bluez/447/hci0 has been enabled
    Oct 28 15:36:28 <computername> bluetoothd[447]: bluetoothd[447]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
    Oct 28 15:36:28 <computername> bluetoothd[447]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
    Oct 28 15:36:28 <computername> bluetoothd[447]: bluetoothd[447]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
    Oct 28 15:36:28 <computername> bluetoothd[447]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
    Oct 28 16:11:55 <computername> systemd[1]: Stopping Bluetooth.
    Oct 28 16:11:55 <computername> systemd[1]: Stopped target Bluetooth.
    Oct 28 16:11:55 <computername> systemd[1]: Stopping Bluetooth service...
    Oct 28 16:11:55 <computername> bluetoothd[447]: bluetoothd[447]: Terminating
    Oct 28 16:11:55 <computername> bluetoothd[447]: Terminating
    Oct 28 16:11:55 <computername> bluetoothd[447]: Stopping SDP server
    Oct 28 16:11:55 <computername> bluetoothd[447]: Exit
    Oct 28 16:11:55 <computername> bluetoothd[447]: bluetoothd[447]: Stopping SDP server
    Oct 28 16:11:55 <computername> bluetoothd[447]: bluetoothd[447]: Exit
    Oct 28 16:11:56 <computername> systemd[1]: Stopped Bluetooth service.
    Oct 28 16:58:47 <computername> kernel: Bluetooth: Core ver 2.16
    Oct 28 16:58:47 <computername> kernel: Bluetooth: HCI device and connection manager initialized
    Oct 28 16:58:47 <computername> kernel: Bluetooth: HCI socket layer initialized
    Oct 28 16:58:47 <computername> kernel: Bluetooth: L2CAP socket layer initialized
    Oct 28 16:58:47 <computername> kernel: Bluetooth: SCO socket layer initialized
    Oct 28 16:58:47 <computername> kernel: thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked
    Oct 28 16:58:54 <computername> bluetoothd[411]: Bluetooth daemon 4.101
    Oct 28 16:58:55 <computername> bluetoothd[411]: bluetoothd[411]: Bluetooth daemon 4.101
    Oct 28 16:59:00 <computername> bluetoothd[411]: Starting SDP server
    Oct 28 16:59:00 <computername> bluetoothd[411]: Bluetooth Management interface initialized
    Oct 28 16:59:09 <computername> bluetoothd[411]: bluetoothd[411]: Starting SDP server
    Oct 28 16:59:09 <computername> bluetoothd[411]: bluetoothd[411]: Bluetooth Management interface initialized
    Oct 28 16:59:00 <computername> systemd[1]: Started Bluetooth service.
    Oct 28 16:59:00 <computername> systemd[1]: Starting Bluetooth.
    Oct 28 16:59:00 <computername> systemd[1]: Reached target Bluetooth.
    Oct 28 16:59:00 <computername> systemd[1]: Service bluetooth.target is not needed anymore. Stopping.
    Oct 28 16:59:00 <computername> systemd[1]: Stopping Bluetooth.
    Oct 28 16:59:00 <computername> systemd[1]: Stopped target Bluetooth.
    Oct 28 16:59:09 <computername> kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    Oct 28 20:46:50 <computername> systemd[1]: Stopping Bluetooth service...
    Oct 28 20:46:50 <computername> bluetoothd[411]: bluetoothd[411]: Terminating
    Oct 28 20:46:50 <computername> bluetoothd[411]: Terminating
    Oct 28 20:46:50 <computername> bluetoothd[411]: Stopping SDP server
    Oct 28 20:46:50 <computername> bluetoothd[411]: Exit
    Oct 28 20:46:50 <computername> bluetoothd[411]: bluetoothd[411]: Stopping SDP server
    Oct 28 20:46:50 <computername> bluetoothd[411]: bluetoothd[411]: Exit
    Oct 28 20:46:50 <computername> systemd[1]: Stopped Bluetooth service.
    Oct 28 20:47:39 <computername> kernel: Bluetooth: Core ver 2.16
    Oct 28 20:47:39 <computername> kernel: Bluetooth: HCI device and connection manager initialized
    Oct 28 20:47:39 <computername> kernel: Bluetooth: HCI socket layer initialized
    Oct 28 20:47:39 <computername> kernel: Bluetooth: L2CAP socket layer initialized
    Oct 28 20:47:39 <computername> kernel: Bluetooth: SCO socket layer initialized
    Oct 28 20:47:39 <computername> kernel: thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked
    Oct 28 20:47:45 <computername> bluetoothd[435]: Bluetooth daemon 4.101
    Oct 28 20:47:45 <computername> bluetoothd[435]: bluetoothd[435]: Bluetooth daemon 4.101
    Oct 28 20:47:52 <computername> systemd[1]: Started Bluetooth service.
    Oct 28 20:47:52 <computername> systemd[1]: Starting Bluetooth.
    Oct 28 20:47:52 <computername> systemd[1]: Reached target Bluetooth.
    Oct 28 20:47:52 <computername> systemd[1]: Service bluetooth.target is not needed anymore. Stopping.
    Oct 28 20:47:52 <computername> systemd[1]: Stopping Bluetooth.
    Oct 28 20:47:52 <computername> systemd[1]: Stopped target Bluetooth.
    Oct 28 20:47:55 <computername> bluetoothd[435]: bluetoothd[435]: Starting SDP server
    Oct 28 20:47:55 <computername> bluetoothd[435]: bluetoothd[435]: Bluetooth Management interface initialized
    Oct 28 20:47:52 <computername> bluetoothd[435]: Starting SDP server
    Oct 28 20:47:55 <computername> bluetoothd[435]: Bluetooth Management interface initialized
    Oct 28 20:47:55 <computername> kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    Oct 28 21:51:35 <computername> systemd[1]: Stopping Bluetooth service...
    Oct 28 21:51:35 <computername> bluetoothd[435]: bluetoothd[435]: Terminating
    Oct 28 21:51:35 <computername> bluetoothd[435]: Terminating
    Oct 28 21:51:35 <computername> bluetoothd[435]: Stopping SDP server
    Oct 28 21:51:35 <computername> bluetoothd[435]: Exit
    Oct 28 21:51:35 <computername> bluetoothd[435]: bluetoothd[435]: Stopping SDP server
    Oct 28 21:51:35 <computername> bluetoothd[435]: bluetoothd[435]: Exit
    Oct 28 21:51:35 <computername> systemd[1]: Stopped Bluetooth service.
    Oct 28 21:52:03 <computername> kernel: Bluetooth: Core ver 2.16
    Oct 28 21:52:03 <computername> kernel: Bluetooth: HCI device and connection manager initialized
    Oct 28 21:52:03 <computername> kernel: Bluetooth: HCI socket layer initialized
    Oct 28 21:52:03 <computername> kernel: Bluetooth: L2CAP socket layer initialized
    Oct 28 21:52:03 <computername> kernel: Bluetooth: SCO socket layer initialized
    Oct 28 21:52:04 <computername> kernel: thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked
    Oct 28 21:52:20 <computername> bluetoothd[415]: bluetoothd[415]: Bluetooth daemon 4.101
    Oct 28 21:52:20 <computername> bluetoothd[415]: Bluetooth daemon 4.101
    Oct 28 21:52:27 <computername> bluetoothd[415]: Starting SDP server
    Oct 28 21:52:29 <computername> bluetoothd[415]: Bluetooth Management interface initialized
    Oct 28 21:52:27 <computername> systemd[1]: Started Bluetooth service.
    Oct 28 21:52:27 <computername> systemd[1]: Starting Bluetooth.
    Oct 28 21:52:27 <computername> systemd[1]: Reached target Bluetooth.
    Oct 28 21:52:27 <computername> systemd[1]: Service bluetooth.target is not needed anymore. Stopping.
    Oct 28 21:52:27 <computername> systemd[1]: Stopping Bluetooth.
    Oct 28 21:52:27 <computername> systemd[1]: Stopped target Bluetooth.
    Oct 28 21:52:30 <computername> bluetoothd[415]: bluetoothd[415]: Starting SDP server
    Oct 28 21:52:30 <computername> bluetoothd[415]: bluetoothd[415]: Bluetooth Management interface initialized
    Oct 28 21:52:30 <computername> kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    I'm not sure why "adaptor  /org/bluez/447/hci0" would be disabled? Or what would have disabled it? I guessing this is the key but is this a symptom or a cause?
    EDIT: I just realised that in the above output, CROND seems to be using the lts modules for bluetooth (not sure what cron does with bluetooth). The records show that I was not booted with the lts kernel at this point. (I had to check as I did try the lts kernel when my machine was badly overheating but it didn't seem to help.) I have no idea what those commands are trying to do, but is that expected?
    Last edited by cfr (2012-10-29 01:30:45)

    Well, what does your root crontab show?  I guess you should probably also dig around to see if you can figure out where those cronjobs are running from.  They indicate root, but I know that can also come from the set of scripts in /etc. 
    What happens if you modprobe that module.  Like maybe load it (and hope that it then loads the right one), or removing the module and reloading it.
    Also, the other day, I discovered that with UEFI, you can have a default efi program that doesn't require a boot manager entry.  Anything that is saved as \EFI\boot\bootx86.efi will automatically be booted when you select your device from the boot manager menu (like the hard drive itself, as if you were going to boot from the mbr).  I am not sure what would happen though if you were to have two efi system partitions though, but I am fairly certain you only have one. 
    So I have set my system up so that I have one boot manager entry for linux-ck, and then my hard drive is second in the boot list.  So if I selecy my hard drive, I have gummiboot set up as bootx64.efi, and from there I have all my other possible boot methods, including the shell.  Since you are a grub user, maybe you should copy grub to that position and see what happens.  I guess this is why the bios has a setting to switch whether uefi or bios should be tried first.

  • XI is running on iSeries server would like to use OS command

    Hi All,,
    I would like to use to "secure" the file/data transfer between XI and any third-party system Run OS Command before processing and OS command After processing. right now my XI server installed on iSeries OS.
    with ISeries we can't call the Unix commands hope we need to go for AS400 (CL) Programming. If we created the AS400 programm how i can call that in XI.
    If any one have idea pls let me know weather it will work or not.
    Thanks in adavance.
    Venkat

    Can you help how this thing work in iSeries, i am trying to run shell script from File Adapter Run Operation System Command before Message procession

  • Would like assistance with multiple devices with multiple iTunes accounts syncing on one PC

    I have had an iPhone for some years now and have been syncing with my PC without issue (first with iPhone 3gs and now with iPhone 4s). My wife bought me an iPad 3 retina in December 2012 which syncs with the same PC as my phone and shares the same iTunes account. Apps downloaded onto one device are automatically downloaded to the other, iMessages are sent and received to both devices also.
    My Wife now has an iPad mini with retina (using her own existing iTunes account which she previously used for an iPhone she no longer uses). I synchronised her new iPad mini with my PC assuming iTunes would manage the device and related account and contents separately to my existing account and 2 devices. However this has caused an issue with the sharing of apps. Since doing so I have started seeing updates available on my devices for apps which I have never downloaded, but my wife has.  If I tell my iPad to update said apps, I am asked for my Wife's iTunes account password. 
    On doing some searching via google I now understand that I should have created a second windows profile on my PC for my wife and installed iTunes onto this profile for the purposes of syncing her device.
    I would very much like to do this, but would like some assistance on the best course of action for doing so. If I proceed and created a second profile and sync her device to this, I presume I would need to tell iTunes to treat her iPad as a new device (and wonder what would happen to her existing content)? Assuming we do this, I presume the issue of my seeing her app updates would still persist?
    Could someone advise if they have any experience with similar issues/queries?

    How to use multiple iPods, iPads, or iPhones with one computer
    http://support.apple.com/kb/HT1495
    How to Share a Family iPad
    http://www.macworld.com/article/1163347/how_to_share_a_family_ipad.html
    Using iPhone, iPad, or iPod with multiple computers
    http://support.apple.com/kb/ht1202
    iOS & iCloud Tips: Sharing an Apple ID With Your Family
    http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/
    How To Best Use and Share Apple IDs across iPhones, iPads and iPods
    http://www.nerdsonsite.com/blog/2012/06/07/help-im-appleid-confused/
     Cheers, Tom

  • Help with a Command script

    Hello,
    Awhile back someone wrote the following script for me. The
    idea was to make a comman that would allow me to reduce an image
    down to 400 pixel width without loss of scale. I want to have a
    similiar command that will reduce a large image down to 400 pilel
    height without loss of scale. I fiddled with the command for width
    but can't get it to work for height. Can I get some help rewriting
    the following command to work for 400 pixel height? Thanks.
    // User Variables
    var width = 400;
    // Command
    var dom = fw.getDocumentDOM();
    var scale = width/dom.width;
    var height = dom.height * scale;
    dom.setDocumentImageSize({left:dom.left, top:dom.top,
    right:dom.left+width, bottom:dom.top+height},
    {pixelsPerUnit:dom.resolution, units:dom.resolutionUnits});

    Tom Hersh wrote:
    > I did try it that way. But I could not get it to work.
    The word "scale" is critical, but I switching did not help.
    Just switch the variables word for word. Height for width and
    width for
    height.
    // User Variables
    var width = 400;
    // Command
    var dom = fw.getDocumentDOM();
    var scale = width/dom.width;
    var height = dom.height * scale;
    dom.setDocumentImageSize({left:dom.left, top:dom.top,
    right:dom.left+width,
    bottom:dom.top+height}, {pixelsPerUnit:dom.resolution,
    units:dom.resolutionUnits});
    // User Variables
    var height = 400;
    // Command
    var dom = fw.getDocumentDOM();
    var scale = height/dom.height;
    var width = dom.width * scale;
    dom.setDocumentImageSize({left:dom.left, top:dom.top,
    right:dom.left+width,
    bottom:dom.top+height}, {pixelsPerUnit:dom.resolution,
    units:dom.resolutionUnits});
    Once you see this script, it's not hard to see what it is
    doing.
    This is the Fireworks generated script scaling just the
    height of an
    image to 400 px from 640x480 px.
    fw.getDocumentDOM()
    .scaleSelection(0.83281248807907104, 0.83333333333333337,
    "autoTrimImages transformAttributes");
    This works on all 640x480 images. Throw in a 700x480 and it
    won't.
    I'm assuming, very few people in here (myself included),
    would be able
    to transform this into something that would account for
    varying widths
    as senocular did.
    SKB

  • Help with Expect command to change config on hundreds of ASA's.

    Hi All,
    I'm looking for some help with the Expect command to automate some tasks, I'm certainly no programmer but I am struggling, here is an example of my script.
    #!/usr/bin/expect -f
    # This simple Expect script will add a new Syslog destination in
    # Cisco switches (IOS based)
    # We assume here that all switches uses the same credentials
    # for the administrative tasks
    # Define variables
    set password "site1"
    set enablepassword "site1"
    # Define all the switches to be reconfigured (separated by spaces)
    set switches "site1 site2 site3"
    # Main loop
    foreach switch $switches {
            puts "Processing switch: $switch";
            # Open the telnet session:
            spawn telnet $switch
            # Perform authentication
            expect "Password:"
            send "$password\r"
            expect ">"
            # Switch to enable mode
            send "en\r"
            expect "Password:"
            send "$enablepassword\r"
            expect "#"
            # Enable configuration mode (terminal)
            send "conf t\r"
            expect "#"
            # Modify VLAN1
            send "interface vlan1\r"
            expect "#"
         # Change VLAN1 Description to Uppercase
            send "description INSIDE\r"
            expect "#"
            send "exit\r"
            expect "#"
            # Save config to NVRAM
            send "wr\r"
            expect "#"
            #Logging out
            send "exit\r"
            expect eof
    In the example this works fine for SITE1 passing the credentials SITE1 as the default password and SITE1 as the enable password.  I need to do usernames and passwords that are different for each site.  I have to make some changes across hundreds of ASA's to terminating tunnels to a new location.  Can anyone help out in how to do this, I know I am close I just need it to read, siteA, username, both passwords from a text file, etc
    Greg

    Hello,
    try to modify this example to your needs ->
    http://www.bitpapers.com/2012/04/cisco-changing-configurations-of-many.html
    Best Regards
    Please rate all helpful posts and close solved questions

  • I know the password is correct, as other devices and this site have accepted the password.  I would like help in uninstalling a few of the devices where the program is no longer needed.

    I would like to use Adobe Digital Editions on a new Nook Tablet.  I believe I have gone over the limit of devices and this may be why my password is being rejected on the new device.  I would like to uninstall the program from devices where it is no longer needed.
    Obviously my password is correct, as I am logged on here. 

    On the wireless networks that your Mac has had trouble connecting to, do you know which Wireless Security type (WEP, WPA, or WPA2) is being used?
    If it is WEP, one of the problems is that the actual standard relies on a 10 character HEX key for 40bit WEP and a 26 character HEX key for 128bit WEP.   In order to make things easier, vendors use certain algorithms to convert simple alphanumeric passwords (or passphrases) into HEX keys, thus enabling the use of simple easy to remember WEP password rather than lengthy HEX keys. The problem is that different vendors use different algorithms to generate the HEX key and therefore a ASCII password on an AEBS will be hashed differently on a non-Apple client and vice versa.   You may find the following Apple Support article helpful.

  • Newby would appreciate help with List Box

    HI all,
    In the process of designing a simple form that has a list box containing multiple salary designations.
    For each of those designations eg Accountant, Accounts Payable supervisor, I have specified an item value in the Binding tab which happens to be the salary of the position
    What I would like to happen is that when a selection is made in the list box i.e. operator selects say Accountant, the item value (in this case the salary) populates another field which is used later for costing calculations.
    Help unfortunately is not all that helpfull so would appreciate any assistance you might be able to provide and thanks in anticipation  

    For example to populate a NumericField1 on the form when the selection was made in ListBox1, you need to use some thing like this.
    Place the code in the Exit event of the ListBox. Language is JavaScript.
         NumericField1.rawValue = ListBox1.rawValue;
    rawValue will give the value that was assigned in the Binding tab.
    Hope this helps.
    Thanks
    Srini

Maybe you are looking for

  • ITunes + Windows 7 64bit + iPop Nano

    I recently updated from Windows Vista 32bit to Windows 7 64bit. Now I have troubles with the latest iTunes 64bit version (9.0.2.25). When I connect my iPod to the computer iTunes detects the iPod but I get an error saying "An iPod has been detected,

  • Creation of item from High Volumn Repair of Depot Repair(Custom Region)

    hi, Take the first job for the current repair order Query: Select WIP_ENTITY_ID from CSD_REPAIR_JOB_XREF Where REPAIR_LINE_ID = < Current repair line_id> Order By CREATION_DATE Asc Take the entered component part number and search in the WIP job mate

  • Joining Requisition and Purchase Orders

    Hi I need to join requisitions and purchase orders. I know that the PO_DISTRIBUTIONS_ALL has the REQ_DISTRIBUTION_ID column which joins with PO_REQ_DISTRIBUTIONS_ALL column DISTRIBUTION_ID. But the REQ_DISTRIBUTION_ID is not null only in the first di

  • Oracle RMAN recovery catalog database in a Primary and Standby mode

    Hello All, The customer wants the RMAN recovery catalog database to be highly available so that none of the RMAN database backup jobs are impacted at the time of taking the database backups. There are are 200+ databases running on OEL, RHEL and Windo

  • How can I get xmouse buttons (middle or custom) to work Flash Play Projector (standalone)?

    I'm using the latest version of Flash Player in standalone mode on Windows 7, and it isn't accepting middle click, xbutton, or xbutton2 input from my mouse. The scrolling wheel works fine. If I use Flash Player in Firefox, all buttons work as expecte