I want to watch a number of processes in "D" status repeatedly with following command:Code:# watch -n 1 'top -b -n 1 | awk '{if ($8 == "D") {print; count++} } END {print count}''but it didn't work. I also tried with double quote. Can I use 'watch' command is this case?PS: I know 'while' and 'sleep' can do the same but it is dirty workaround.
I need sed to be able to search a string that includes both single quotes (') and double quotes ("). can anyone help me out, there has to be a way to do this.
So far I have tried:
But none of these work and I cannot think of how else to escape the sed quote inside of brackets.
There is probably a very simple fix, but its wrecking my buzzI call the following on the command lineR CMD BATCH '--args Y_filename="one.txt" out="two.txt"' brew.RI want to call this from a bash script but replace one.txt with $1, and two.txt with $2 (ie the first two arguments from the command line)I have tried in vane"R CMD BATCH '--args Y_filename="$1" out="$2"' brew.R"
I need to find each line in a file which does NOT begin with a double quote (") and append that line to the previous line. I have been successful doing this using the following command: cat filname.csv | sed -e :a -e '$!Ns/ [^"]//;ta -e 'P;D' > newfilename.csv
My issue is the substitution. As you would expect after the line is appended to the previous line the first character is removed. I need it to not be removed. I tried: cat filname.csv | sed -e :a -e '$!Ns/ [^"]/&/;ta -e 'P;D' > newfilename.csv but it just hangs.
Goal: Input: "line 1" line 2 Output with existing sed command is: line 1ine2 I need it to be line1line2.
the project I'm working on requires parsing a text file with fields separated by the | char and using perl to insert/update a mysql database. Some of the fields are simple numeric and others are text fields. In some of the text fields I run into a problem creating a proper insert statement for the perl api to mysql if I don't escape the single quote (') char with a backslash (). I can take each text file and do a manual subsitutiton, but I would prefer to use the script that prepares the text file to do it for me. I've tried sed (ex: sed s/'/\'/g ) and it runs cleanly, but does nothing to accomplish my goal. I suppose I could write a function to read the file character by character and write it out that way, but it seems a waste.
I have a problem with my keyboard. I�m unable to type single or double quotes, at least not the regular sort that you need to write code in almost any programming language ever invented -which makes it pretty useless.A demonstration.Single left and right tilted quotes:Double quotes: m not able to type a single straight quote at all.I just want my keyboard layout to be standard US like everyone elses so I can get on with my work so does anybody know how to just reset it to a normal layout?
I am arthritic and I have considerable difficulty with a double click. I also have difficulty when using a mouse of moving the mouse as I select something (click the button) from whatever window I am working with and thereby selecting the wrong thing. To compensate for this difficulty, I use a Logitech trackball and program the center button to perform a double click with one stroke. I am currently struggling with Linux Mint 9 in my search for a Windows alternative. Is there any way to program my center button (scroll wheel) to perform a double click in this or any other Linux version? Alternatively, is there any way to program a keyboard key to perform a double mouse click with a single stroke? I do not want any multiple key combinations for this operation, I want something that works with a single click of one button.
Every time I right click on my CD/DVD with my DVD+RW popped in the drive, it freezes for like 10 minutes and then it unfreezes with nothing happening.I think I formatted it before using ImgBurn but when I did it went from 4.7GB capacity to 3GB. Is it possible that I accidentally turned my double-layered DVD to single-layer? If so is there a way to turn it back to double-layer?
I have question about the UNIX sockets. my goal is to connect multiple sockets from a single client to a single server and keep them open...I'm not sure if that is possible to create or not. Do you have any suggestion or an example of code?
i downloaded the centos 5.5 cds in cd version. it has 7 cds. Now i feel, its better if its a single dvd, to install , to update the packages n all.so is it possible to convert the seven cds to one single dvd. i tried unraring the seven cds , combined them and burnt as a DVD, but in vain.so is it possible to do ? any other ways ?? help plz!
In bash I need to use some equivalent of double quotes inside double quotes (or the other way around.)I need to run the following statement to get the output of foo and store it in a variable while passing foo the $file which probably contains spaces.
Code: variable=$(foo "$file") The problem is that foo might return an empty string and if it does I need to catch it
I'm not sure if I should post this question in "hardware & laptops", or "Desktop Environments", because this is a hardware problem on a desktop computer.
Description of Problem:There is another thread that discussed this same problem that I'm having: However that thread is so old that the suggestions in it no longer work in Ubuntu 10.04 and for whatever reason I can not make a reply to that thread.As in the above thread, I've tried other input devices and rebooting the computer and using other USB ports, and my mouse still intermittently double left clicks randomly at times when I've only clicked the left mouse button once and at times and places when it should only produce a single click such as when selecting a drop down menu.
Has any one else had this problem, and does any one have any idea how to fix it or to trouble shoot this a bit more? Please let me know if there is any other information I can provide to further clarify or troubleshoot this issue.
when i click my mouse on something, it sometimes registers as two clicks. it doesn't happen all the time, but frequently enough to be annoying. for example, when i click a videos video to pause it, it often opens into fullscreen (which you normally click twice to do). also, in the url bar of chromium, i can't select the entire url by clicking. i now need to use ctrl+a. that's also because when i try to select the url, the highlight randomly disappears.
if i have multiple windows open, my click on the first "x" of the top-most window also closes the next window. i'm on linux mint 10. it's not really important, but it drives me crazy sometimes when my mouse doesn't work the way i want it to.
About a week ago I installed some updates. What they were I don't remember. After I did that my mouse started acting up. Now about half the time when I single click it registers as a double click. Also when I click and drag to select text anywhere it'll randomly do another click screwing up that process.
So far I think the problem is when I press the left mouse button it registers the left click and then when I release, it randomly registers another left click.
The mouse itself works fine if I take it to another PC that's using windows.
OS: Ubuntu 9.10 64bit Mouse: Microsoft Intellimouse 3.0
Code: linux-uitj:/home/anisha # uname -a && cat /etc/*release Linux linux-uitj 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 x86_64 x86_64 x86_64 GNU/Linux openSUSE 11.2 (x86_64) VERSION = 11.2
If I normally click the Trash icon either in Kmail or in Evolution more than one mail gets deleted in a sequential order! I have to press the click button extremely light to avoid this problem. I have confirmed this problem is not only with the Email clients but even with most other normal applications too. I have changed my mouse twice but the problem persists. Both were USB mice. Below I have provided log information :
Code: linux-uitj:/home/anisha # dmesg | grep usb [ 0.138267] usbcore: registered new interface driver usbfs [ 0.138267] usbcore: registered new interface driver hub [ 0.138267] usbcore: registered new device driver usb [ 0.396952] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 0.396956] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.396958] usb usb1: Product: EHCI Host Controller [Code]....
For some reason now when I left click slackware sees it sometimes (4 out of 5 times) as a double click. This is very frustrating? Here is a list of ps aux
Code: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.1 0.0 824 276 ? Ss 12:39 0:01 init [4]
I am not sure If anybody has faced this issue, my keyboard is less responsive when pressing the double quote/single quote key, I have to press it twice for it to print the quote( and that too it prints some other data and not exactly a double-quotes). Initially I thought it was issue with my keyboard, but later I see that it is working fine in Windows XP. It looks some kind of setting issue. If you check the below two examples, example a) is the double quote printed in Ubuntu, it doesnt exactly looks like a double-quotes and b) is the one printed in Windows.
Ubuntu 10.04 LTS has no immediately apparent way that I can see for changing the mouse behavior from the default double-click to single-click. There appears to be some type of kludgy, but unsatisfactory fix for this unwanted behavior in the Accessibility-option, under Mouse-Preferences.
I kept my movies on a 2 drive software raid1 mirror, but now I changed my mind about needing a raid and pulled one of the drives for another use. Can I convert the remaining raid drive back to a regular single drive and keep the data in place? Can I change the raid partition back to regular partition and be able to mount it?
I know Ghostscript can convert PDFs to JPGs, and in the case of a multi-page PDF, can rip each page to an individual JPG. But is it possible to have it rip them to one JPG, so that the pages are pasted below each other, e.g. the top half of the JPG is page 1, the bottom half is page 2? Or do I have to use another program (and can ImageMagick do this?) to combine the JPG pages into one image?
I have a large number of scanned JPG images that I would like to convert into a single PDF file -- each image will be on its own page, and I want the pages to be in a certain order.What is the command for ImageMagick to take a batch of JPGs and convert them to PDF, and order the pages in a certain way.
(by the way: I am working on writing a Gentoo ebuild for convert2pdf at the moment, but until I get that worked out, I'd like to figure out how to do this using Imagemagick, which is already in the portage tree, and already installed)
I try to configure mouse click interval since a single click is recognized as double click by doing it from KDE mouse configuration in system settings; but my attempt doesn't work even (I set the click interval to 2 sec, but doesn't change anything). What is the best way to do this in slackware?