Programming :: SED - Convert Double Quote To Single
Jan 21, 2010
I want to convert double quote to single quote in a text file. I tried escape characters however no success. Please find details as follows:
-sh-3.00$ sed 's/"/'/g test.txt
sed: -e expression #1, char 7: unterminated `s' command
-sh-3.00$ cat test.txt
"unix"
I want "unix" to be converted to 'unix'
View 7 Replies
ADVERTISEMENT
Aug 12, 2010
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.
View 2 Replies
View Related
Oct 27, 2010
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.
View 3 Replies
View Related
Jul 21, 2010
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"
View 8 Replies
View Related
Aug 13, 2010
Made the following bash script named trimsquote:
Code:
#!/bin/bash
IFS=$'
[code]...
View 6 Replies
View Related
Apr 5, 2010
Someone know how i can convert from hex string to double in c/c++?? Example 40668472B020C49C is 180.139
reference page: http://babbage.cs.qc.edu/IEEE-754/64bit.html
View 10 Replies
View Related
Mar 15, 2011
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.
View 9 Replies
View Related
Oct 2, 2010
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.
View 2 Replies
View Related
Jan 21, 2010
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?
View 4 Replies
View Related
Jul 19, 2010
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.
View 4 Replies
View Related
May 6, 2011
Just a minor frustration, I have not found how to do this, double clicking serves what purpose? Am I going to change my mind between clicks?
View 2 Replies
View Related
Jun 5, 2010
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?
View 1 Replies
View Related
Jul 1, 2011
Under Gnome on 10.10, does anybody know how to make the Rubbish Bin open when one double-clicks the icon as opposed to single-click?
View 7 Replies
View Related
Oct 13, 2010
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?
View 1 Replies
View Related
Aug 15, 2010
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!
View 1 Replies
View Related
Jun 6, 2010
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
[code]...
View 6 Replies
View Related
Jan 14, 2009
where can I change the single click into a double click (because I'm a windows user (sorry!))? The mouse model does not support this.
View 4 Replies
View Related
Jun 15, 2011
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.
View 2 Replies
View Related
Apr 13, 2011
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.
View 3 Replies
View Related
Mar 13, 2010
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
View 9 Replies
View Related
Feb 4, 2011
mouse menu different in 10.10, is there a way to make the mouse single click instead of double click?
View 2 Replies
View Related
Aug 18, 2010
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]....
View 9 Replies
View Related
Jun 13, 2011
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]
[code]...
View 11 Replies
View Related
Aug 2, 2011
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.
View 1 Replies
View Related
Aug 9, 2010
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.
View 5 Replies
View Related
May 27, 2010
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?
View 6 Replies
View Related
Jul 27, 2010
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?
View 2 Replies
View Related
Apr 14, 2009
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)
View 6 Replies
View Related
May 18, 2010
Was wondering if it's possible to set up a single disk with btrfs and then later on convert it to a 'mirrored' array?
View 1 Replies
View Related
Apr 29, 2010
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?
View 4 Replies
View Related