I have the following command, which works fine:ll /backup/PROD |grep PROD_ |awk -F" " '{print "catalog backuppiece /backup/PROD/"$9";"}'The output is:catalog backuppiece /backup/PROD/PROD_29mi42vn_1_1;BUT... I want single quotes in the result. One before /back.. and one before the ;Like this:catalog backuppiece '/backup/PROD/PROD_29mi42vn_1_1';How do I do that? I tried using ' but it does not work.The following command works, but I get an error message, which prevents me from using the command in a bash file:ll /backup/PROD |grep PROD_ |awk -F" " '{print "catalog backuppiece '''/backup/PROD/"$9"''';"}'awk: warning: escape sequence `'' treated as plain `''
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.
I want to grep for $_POST['whatever']. I've done enough googling and trying different things (and failing) to where I felt it appropriate to post here. How do I identify the single quotes as literals? slashes don't seem to do it.
Can anyone offer a code snippet to recursively go through directories and replace any single or double quotes quotes found in a filename with another character (e.g. "_").If any of the filenames contain a single quote or double quote, then replace it with an underscore.
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'm experimenting with old linux Distributions again, and while trying tostart an x server, I get the following error message:X: unable to open display ''That makes me think that the config file is incomplete, but I would have no idea how to make it. If there is an auto configuration utility that I do not know about for X, it would be great to hear about. Here are some other specifications that might help:*Host: VMWare Workstation on Windows XP Home*Distribution: Debian 2.2 (potato) (Yes, I know it's old.)*Connection: Local. I've heard of people having difficulties like this on remote connections, but I am on the physical computer
After I assign a string to a variable, I know that the print function will remove the single quotes around the value, but is there a way to assign a variable without the quotes around the value? for example:
a = open('/usr/lib', 'r+') b = f.read() c = x.replace('.xx','yy') d = ?
c returns the value with quotes around it print c returns the value without the quotes Is there a way to assign a new variable (d) which will equal c without the quotes? I need a new variable which has the quotes omitted because from there the script will take the value of the last variable (which is a path to a file), and tar up that file. It won't recognize the path to the file if the value has quotes around it.
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 was going to file a bug to findutils on gnu.org when I saw a notice that asked me whether I knew the difference between these two commands:find -name *.c and find -name "*.c".I use find command quite often but I don't think these two have any difference.
When I run for i in $(find -name '*.ogg'); do echo '$i'; done I don't get one line per file as I expected. Instead, when a file name has a space in it, each word comes out in a separate line, so I can't run commands on the files.
I am trying to synchronize the content of the directory my_dir/ from /home to /backup. This directory contains a file which name has a double quote in it, such as to"to. Here is my rsync command: rsync -Cazh /home/my_dir/ /backup/my_dir/
And I get the following message: rsync: mkstemp "/backup/my_dir/.to"to.d93PZr" failed: Invalid argument (22) For info, rsync works well when the synchronized filenames contain single quote, parenthesis and space. Thus, why is it bugging with a double quote?
The following script will work when I type the path to the file I want to checksum, but not when I drag the file to the terminal because the linux terminal (unlike the Mac) automatically puts quotes around the file path, which causes an error. I did not find anything in gconf-editor or anywhere else to alter this behaviour, and my post in Launchpad is unanswered so far. (the script in itself is not very useful, I just stumbled upon this error when experimenting with bash).
So, is there a workaround for stripping the quotes from the input, or can I configure the terminal to not quote the input when I drag a file into it (which I would prefer?)I am currently logged in from Mac OS, but the question refers to ubuntu karmic with which I dual boot.ADMINISTRATORS: Thanks for the quick reply to my newbie question about posting new threads. Actually I don't see now what the difficulty was; I guess I was tired from trying to debug the above script (not funny).
I expected more from ubuntu 10.4 with regards to printing with exact size photos and with poor auto colour printing but the situation remains unchanged! for instance .. the photo size configurations for ubuntu/fspot/gimp and others are not compatible with my printers (HP and Brother) .. here in Europe a typical standard size photo (10x15inches or 150x100mm are not even on the Ubuntu listing? I have tried all listed possibilities including "custom" (which does not seem to ever work correctly?)and the result at best is photos with uneven boarders or at worse my printer goes a bit crazy with much wasted photo paper and expensive ink ...even photos selected for "no boarders" still produces photos with the self same uneven boarders.
I have tried pretty much everything over time following advice in this forum and including using HPlip and updating drivers required for my Brother printer but the root problem seemingly lies with the Ubunto photo size setup listing. Working with Ubuntu over the years I have found that it can do pretty much everything that Windows can do except for this dam ongoing photo quality and configuration problem.
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 converted my programming project over to autotools, which gives me a config.h file with all the cool definitions, like these ones:
Code:
/* Location of data files. */ #define DATADIR "/usr/local/share" /* Define to the full name of this package. */ #define PACKAGE_NAME "lusus"
And naturally I think this is cool because then I can hardcore these into the binary. To my dismay, however, I discovered that the pre-processor does not do the text-substitution if the macro name is inside another quoted string.
Code:
// Prints out "/usr/local/share/lusus" std::cout << DATADIR << "/" << PACKAGE_NAME << " ";
In Thunderbird, when composing a reply to an email that you have quoted, is there a way to cut only part of the quoted material? A typical situation is that you have exchanged a series of emails with someone and your reply has all the old emails from your and the otherperson quoted in it. The quotes are nested inside each other. Often I'd like to chop off all the very old messages and just leave the last few. But the Thunderbird editor seems to make it an all-or-nothing proposition. I can cut the whole quote, but can't highlight a few nested parts and cut them.
trying to edit a huge configuration filer graphviz that containsIP addresses.unfortunately, some of the IP addresses didn't get parsed right and have only 3 octets. I am trying to use sed to find these 3 octet lines and delete the line entirely.example lines in the file look like this.
I'm trying to write a bash script that has to extract values from a csv file. Problem is there are lines like this:a,b,c,"dd,dd,dd",e,f,gI'm using awk to extract the values but when I try it extract value 4 with awk I get:"ddinstead of:"dd,dd,dd"Does anyone know how to get awk to ignore commas within double quotes?
We have 'SNOWMAN' UTF-8 character in our files which i need to replace with doublequotes (").The UTF-8 hex value for 'SNOWMAN' is 0xE2 0x98 0x83 (e29883) , I have written the commands like this but it is not working .........sed -i 's/x0xE2 0x98 0x83/"/g' FileName
I am trying to get PvPGN working... I have installed all the files, the only thing now is that bntrackd wants to use 'logs/bntrackd.log' for it's logfile, but seeing as it's in /usr/sbin, I want it to use /var/log/bntrackd. This is done with 'bntrackd --logfile=/var/log/bntrackd.log' but when I put that in the script it won't process it as a command (instead splitting it and complaining that I don't have --logfile=/var/log/bntrackd.log installed)
/etc/rc.d/pvpgn:
Code: #!/bin/bash ... [ -z "$PVPGN_DAEMONS" ] && PVPGN_DAEMONS=(bnetd d2dbs d2cs) ... for d in ${PVPGN_DAEMONS[@]}; do
The following script will work when I type the path to the file I want to checksum, but not when I drag the file to the terminal because the linux terminal (unlike the Mac) automatically puts quotes around the file path, which causes an error. (Clarification: am referring to gnome-terminal. Thanks, GrapefruiTgirl.) I did not find anything in gconf-editor or anywhere else to alter this behaviour, and my post in Launchpad is unanswered so far. (the script in itself is not very useful, I just stumbled upon this error when experimenting with bash).
So, is there a workaround for stripping the quotes from the input, or can I configure the terminal to not quote the input when I drag a file into it (which I would prefer?)
I am currently logged in from Mac OS, but the question refers to ubuntu karmic with which I dual boot.
So I think I almost have gnucash figured out. One problem though. When I try to import my stock quotes for my portfolios, It won't get any quotes for my OTC BB Stocks. Under the security editor, there is no option for OTC as an exchange. For example: CNEX. How would I set GnuCash up to import this quote?
I wrote the Automatik widget (you can find it at :http://kde-look.org/content/show.php...&PHPSESSID=caeTo improve it, I would like to add this one-line script into a text sensor :
top -b -n 1 | head -12 | tail -6 | sed '/top/d' | awk '{ printf "%-12.12s %-4s %-4s %-3s " , $12,$9,$10,$2}'
I'm really new here this is the first try to get some knowledge here.I have a littele question."echo {1,2}" does expands 1 and 2.so does "echo "`echo {1,2}`"".But when I do it with double quotes which is "echo "{1,2}"" it doesn't expand at all.why does this happen? I have read man for bash but could not get any clue.
Yuki Code: -- the output i see -- sh-3.2# echo {1,2}