Programming :: Ignore / Disable Ctrl-C (SIGINT) In Shell Script

Jan 6, 2010

How do I write my trap statement in shell script to ignore SIGINT.Reason being is that the script is used to update records in database. I want to avoid inconsistency in database when user presses Ctrl-C .The result should be

1. Totally ignore Ctrl-C (SIGINT) when user presses Ctrl-C
2. Continue with the rest of processing

View 3 Replies


ADVERTISEMENT

SUSE :: Redefine Ctrl+C As The SIGINT

Jan 5, 2010

I've done some hunting on this and other forums as well as my own system and have come up dry. I have a SLES10 box where root is using the Korn shell as the default. There was a lot of system configuration done by the vendor of the app that sits on this box and one of the "features" is that Ctrl+C no longer sends a SIGINT. I just get "^C" when I try. Needless to say, I'd like to redefine this so that I can kill commands/scripts without the need to manually whack the PID. Where is the Ctrl+C defined and what steps do I take to redefine it to its default behavior?

View 6 Replies View Related

Programming :: Ignore Case In If Statement Shell Scripting

Feb 3, 2010

How do i make my strings case-insensitive while comparing them with an if statement?

View 2 Replies View Related

General :: Disable Ctrl+C, Ctrl+V, Ctrl+X In Rdesktop?

Dec 27, 2010

I am doing a project on rdesktop. My aim is to setup a write/copy protected session. I have made rdesktop connection between two Linux machines using Xrdp.Next I want to disable the ctrl+x,ctrl+v keys and the cut and copy option in mouse right click at client side

View 1 Replies View Related

Programming :: Recognizing Ctrl+c,ctrl+l,ctrl+d In C Programs?

Aug 19, 2009

i am using gcc 4.3i need to recognize ctrl+c,ctrl+l,ctrl+d in my C program without terminating the program when i get a ctrl+c...

View 1 Replies View Related

Fedora :: Disable Ctrl + Alt + F10 In F13 ?

Aug 31, 2010

I often use the key combination ctrl + shift + F10 in my editor, and sometimes I mistakenly hit ctrl + alt + F10 which instantly transports me to a black screen with nothing but a cursor resulting in my having to reboot. I have no idea what the purpose of this key binding is but I want to get rid of it. I have looked in 'keyboard shortcuts' but there is none listed for ctrl + alt + F10. How do I disable this once and for all?

View 4 Replies View Related

Ubuntu :: Nautilus: How To Disable CTRL+Q?

Mar 23, 2011

There must be a way to disable CTRL+Q for Nautilus, but google has failed me Actually, I usually have several permanent nautilus windows opened, and when I just hit CTRL+Q on the wrong window, it closed all of nautilus!

So I just "pkill nautilus" to restore the previous nautilus session (even if we can't control nautilus window session manually). But there are still a few things that could be improved for Nautilus. So for now, can we disable CTRL+Q shortcut for Nautilus?

View 3 Replies View Related

Ubuntu :: How To Disable CTRL+SHIFT+ALT+F1

May 4, 2011

How can I disable CTRL+SHIFT+ALT+F1?

View 6 Replies View Related

General :: Terminal - Disable C From Being Echoed On Ctrl-C?

May 30, 2010

When I press Ctrl-C in any pseudoterminal (xterm, gnome-terminal, rxvt, text console and SSH) in Karmic Koala, the string ^C gets echoed to the terminal in Ubuntu Karmic Koala. This hasn't happened in Ubuntu Jaunty Jackalope. I'd like to get rid of the extra ^C. Example:

$ cat
foo
foo
^C
$ _

I got the above by typing C, A, T, Enter, F, O, O, Enter, Ctrl-C. I want to get rid of the ^C, and get this for the same keypresses:

[Code]...

I tried setting stty -echoctl, which solved the problem for rxvt and xterm outside SSH, but it created a single-character HT when SSHing from an Ubuntu Hardy system, and it created a box with Unicode 0003 in it instead of the ^C in gnome-terminal. I want to see absolutely nothing when I press Ctrl-C. I'm using. Linux linux 2.6.31-20-generic-pae #57-Ubuntu SMP Mon Feb 8 10:23:59 UTC 2010 i686 GNU/Linux I have these terminal settings in all systems and all terminal emulators:

ioctl(0, TCGETS, {c_iflags=0x2502, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="x03x1cx7fx15x04x00x01x00x11x13x1ax00x12x0fx17x16x00x00x00"})

View 2 Replies View Related

Software :: Disable Ctrl W Shortcut In Firefox ?

Dec 23, 2010

How to disable Ctrl W shortcut in Firefox ?

Firefox does not provide any tool to do that. I am using gnome and Fedora 11. I tried the extension "Keyboard Shortcuts 0.1" it does nothing.

View 9 Replies View Related

Ubuntu :: Can't Switch To Shell With Ctrl+alt+F1

Sep 18, 2010

I can't switch to shell with ctrl+alt+F1. The screen gets completely blank and nothing happens - though I can switch back to the GUI by pushing ctrl+alt+F7 again.I really miss having this option!

View 2 Replies View Related

Ubuntu Servers :: Disable Ctrl-alt-del On Lucid Server?

May 11, 2010

I would like to disable the ctrl-alt-del feature for a Lucid Lynx server.
i found some info on how to enable this in desktop environments, however nothing explaining how to disable it for a server.

View 3 Replies View Related

General :: Shell Command Equivalent To (Ctrl+C) To Exit From A Process?

Apr 1, 2011

I write a script to read a file which is something like a pipe (or) queue , which shows the running status.In normal case, if i open this file with cat command, i have to use ctrl+c to exit this . What command shall i use to do the same inside a shell script ? I have tried ^C in my script , but it does not exit the process.

View 6 Replies View Related

Programming :: Setting IFS To Ignore Pattern?

Mar 11, 2010

I'm working on a backup script which takes the following input:

Code:
RevBackup.sh <options> <source> <target>

The problem I'm having is that the source and target might contain spaces in the path. ie. /home/eRJe/My Documents

I would like the script to ignore " " (backslash-space) as being a delimiter. how could I do this without stopping a normal space from being a delimiter?

I could do this with IFS. But so far I have only found info about setting a delimiter and not to "ignore" one

View 4 Replies View Related

Fedora :: Create A Non-terminating (by CTRL + C) Shell Script Launcher On Gnome?

Feb 12, 2010

How do I create a launcher/shortcut on Gnome desktop, which starts a Terminal window and executes a shell script?The script should execute as if I started the script manually, i.e. if I abort the script by pressing CTRL + C, the script should terminate but the terminal window should remain on screen.If I create the shell script launcher/shortcut using the �straight forward �Create Launcher� method�, the terminal window also closes when I hit CTRL + C

View 8 Replies View Related

Ubuntu :: Map Ctrl+W In Hebrew Layout(which Is Actually A Ctrl+') To Be A Ctrl+w?

Jan 5, 2010

I have 3 layouts: USA, Russian and Hebrew. In Hebrew the W key is mapped to apostrophe, so Ctrl+W in Hebrew layout doesn't close tabs in Firefox. There is no workaround for it as I see by now, so I am trying to get it work this way:I want to map Ctrl+W in Hebrew layout(which is actually a Ctrl+') to be a Ctrl+w. Here is what I got from xmodmap:Code:$ xmodmap -pke | grep 25keycode 25 = w W Cyrillic_tse Cyrillic_TSE apostrophe WAs you can see, there are pairs for each layout, each pair tells what happens without and with the Shift key pressed.

View 2 Replies View Related

Programming :: Scanner - Completely Ignore The Kbd.nextLine Statement

Nov 12, 2010

This is what I have

Code:

When I run the program it will print

Quote:

rather than

Quote:

And completely ignore the kbd.nextLine statement.

However, when I write next instead of nextLine, it works.

View 3 Replies View Related

Programming :: Sets Sigpipe's Default Action To Ignore And Opens A Socket?

Jul 27, 2011

I'm studying an OS programming book, in particular network sockets. I have two questions(2nd one is down at the bottom). There is something I don't quite understand. What if this piece of code, which sets sigpipe's default action to ignore and opens a socket:

Code:
if ((u_ignore_sigpipe() != 0) || ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1))
return -1;

[code]....

View 3 Replies View Related

Programming :: Shell Scripting / Create A Shell Script Similar To Ls?

Jun 5, 2011

I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.

Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....

View 10 Replies View Related

Programming :: Bash-shell-like Less Functionality In The Python Shell?

Jun 25, 2010

Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?

Example:

Code:

>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...

I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.

View 4 Replies View Related

Programming :: Map Special Keys In Vim - E.g. Ctrl+< ?

Apr 25, 2011

How to map special keys in vim, e.g. ctrl+< , ctrl+> , shift+< . I want to resize the windows in vim, ctrl+w+< is complex, I want map it to double press ctrl+< , how can I achieve it ?

View 2 Replies View Related

General :: Vim:ctrl+v Command To Select Some Data.But When Push Ctrl+v.It Doesn't Work?

Nov 28, 2010

" Mark the start of the text with "v", "V" or CTRL-V. The character under the cursor will be used as the start.""With CTRL-V (blockwise Visual mode) the highlighted text will be a rectanglebetween start position and the cursor."I can mark the start with "v" or "V".But it doesn't work when I push ctrl+V.

View 14 Replies View Related

Ubuntu :: Keyboard - Can Not Copy/paste Ctrl+C Or Ctrl+p From One Folder To Another With Mouse

Sep 5, 2010

I can not copy/paste ctrl+C or ctrl+p from one folder to another with the mouse. i was trying to move an item to another folder.

I looked in the keyboard short cut and it was not there. i tried to add it and it put it in custom as disabled and I could not enable it.

View 2 Replies View Related

CentOS 5 :: Why 'ctrl+a, K' Nor 'ctrl+a Kill' Doesn't Work For Screen Windows?

Oct 3, 2010

anyone has a clue why 'ctrl+a, k' nor 'ctrl+a, :kill' doesn't work for killing one of screen windows? Other screen's commands invoked with 'ctrl+a'seem to work.

View 3 Replies View Related

Ubuntu :: Freezes Mouse After Changing A Tab (with Ctrl+tab, Alt+#) Or Closing It (ctrl+w)?

Nov 11, 2010

I just installed Ubuntu 10.10 x64 and already am really annoyed by Firefox, which freezes my mouse after changing a tab (with ctrl+tab, alt+#) or closing it (ctrl+w). After about one second, i can continue working as usual. Changing Tabs by just clicking on one does not freeze anything...Maybe some of you would think now if I am crazy because of complaining about such a little thing, but it is really annoying if you are used to work fluently with ff.Edit:I today noticed, that not only shortcuts in firefox, but all Hotkeys freeze my mouse for a second. For examle ctrl+c, ctrl+v, super+e or anything else.Do you have any Idea what causes this behaviour? Reinstalling ubuntu didn't change anything

View 4 Replies View Related

Programming :: BASH: Detecting CTRL+C Being Pressed?

Jan 28, 2010

I am working on a script and I want it to detect if CTRL+C is pressed at any time during the script and have it not Break the script and display a message stating to use CTRL+Z instead. How can I do that?

View 9 Replies View Related

Programming :: Use CTRL+D Signal In Bash Script?

Jan 15, 2010

I am writing a bash script where I need standard Input should be saved in a file and should be terminated by passing CTRL+D signal. Any clue how can I do that in bash script.

e.g.
Enter one line at a time
Press CTRL+D to finish

View 1 Replies View Related

General :: Disable Color In Shell / Terminal

Apr 6, 2011

I want to disable all color in my shell. Not ls, not nano, not vi, nothing.

View 3 Replies View Related

Programming :: Enable CTRL+C (to Terminate The Program) While Still Have RAW Mode?

Jun 2, 2010

changed terminal into raw modecfmakeraw(&termios);After that terminal no more captures CTRL+CIs there a way to enable CTRL+C (to terminate the program) while still have RAW mode?

View 3 Replies View Related

OpenSUSE :: Ctrl+z And Ctrl+c Do Not Work Without A Third Keystroke

Feb 3, 2010

I just spent a few days ripping out all the broken/buggy apps that are in the opensuse 11.2 official repos so I can finally get working software(openoffice, thunderbird, wine, eclipse, rubygems, rails, and a few others required getting the "official" versions from their respective websites to avoid strange behavior and outright broken functionality).

All of which makes updating more annoying and time-consuming. Why are opensuse packages so different anyway? Anyway, the last thing that I have noticed to fix is Konsole. For some really bizarre reason ctrl+z and ctrl+c do not work without a third keystroke: enter.Maybe this is something new with the KDE team, since they seem bent on making simple things that already work more complex, but given my experience with crappy packages in the suse repos, I am thinking this is the problem. I have looked over all the config settings that I can find and nothing fixes this affront to productivity.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved