Ubuntu :: Shell Curly Braces With Double Quotes Does Not Expand As Expect?

Jan 13, 2011

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}

[code]...

View 3 Replies


ADVERTISEMENT

Programming :: Double Quotes Inside Double Quotes?

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

Ubuntu :: Double Quotes And Single Quotes Not Working In 11.04?

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

Ubuntu :: Sed Finding Item That Contains Double Quotes?

Jul 28, 2011

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.

"22.210.73" -> "192.168.159";
"22.210.232" -> "22.210.248";

i have tried doing various things but to no avail. i had something that looked like this...

sed -i '/"*.*.*"/d' myfile

View 2 Replies View Related

General :: How To Use Rsync When Filenames Contain Double Quotes

Jan 29, 2011

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?

View 3 Replies View Related

Programming :: Ignoring Commas Within Double Quotes?

Nov 4, 2010

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?

View 5 Replies View Related

Red Hat / Fedora :: Replacing SNOWMAN With Double Quotes Using Sed?

Feb 24, 2010

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

View 8 Replies View Related

General :: Escaping Double Quotes In A File?

Dec 12, 2010

I know it is pretty trivial but anyway...I have php file that I am trying to read it looks like this

...
add_item_tabulky("Klaun-PF 2011","klaun_pf2011.jpg","","","");
add_item_tabulky("Pras�tko-�ťastn�

[code]...

View 3 Replies View Related

Programming :: Remove Double Quotes Bash?

Jul 20, 2011

grep -e XkbLayout /etc/X11/xorg.conf | grep -v "^#" | awk '{print $3}'

output = "gb"
sometimes= "us"

View 4 Replies View Related

Fedora :: Keyboard: Single And Double Quotes Not Working?

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

Programming :: Double-quotes Do Not Escape Properly (bash=python)?

May 2, 2010

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}'

[code]...

View 3 Replies View Related

Ubuntu :: Shell Script For Telnet Using Expect - Unable To Find The Tutorial

Jan 22, 2010

I need to open a telnet session using a shell script that follows this format:

telnet 10.100.0.1
expect "Password:"
send <password>

[code]....

send "pen" (till the end of lines generated as in |more.... usually we use like 8 space bar buttons after "pen" to generate all)
and I want to redirect the whole generated result of "pen" to results.

View 3 Replies View Related

Programming :: Can Expect Return Control Of A Spawned Process To A Shell Script

Nov 19, 2009

Is it possible to have an Expect script spawn an SSH session, log in, then go into interactive mode and give control of the SSH session to a Bash script? Here's a simplified example of the script so far:

Code:
#!/bin/bash
expect -c "

[code]....

View 4 Replies View Related

Ubuntu :: Good Expect Tutorial For Programing With Expect?

Nov 2, 2010

I'm trying to Use Expect to automate a curl function. basically I don't want to type enter for my script to run. Can anyone point me to a good Expect tutorial?

View 1 Replies View Related

Programming :: /usr/bin/expect : Script To Check Server Load Using Both Expect And Bash?

Jul 27, 2010

I am trying to make a script that can be used to check server load on a remote server and produces sound on our local machine, when server load exceeds a particular limit.1. I want to execute command uptime or uptime | awk '{print$10}'on the remote server and store the result in a variable(say x), and later use it in the bash script.

Bash Part
#!/bin/bash
x=$(/root/Desktop/exp)

[code]...

View 1 Replies View Related

General :: Shell Script Execution On Double Click?

Feb 27, 2010

I could run the script from terminal. My script invokes some installation and works fine.But my wish is that end-user should double click the sh script and it should run.But how? I got few links - but none was of was quite helpful

View 6 Replies View Related

General :: Expect: Line Seems To Match Exactly However Expect Thinks Not?

Jun 16, 2010

I am writing an expect script. At a certain point there is a rule that produces this debugging output:

Code:

expect: does " Address or name of remote host [x.x.x.x]? " (spawn_id exp8) match glob pattern " Address or name of remote host [x.x.x.x]? "? no This just times out When I use -exact for the expect keyword it does work What am I doing wrong? THe first should also match in my opinion because it is equal as well. Even if I remove the I still have the same issue if I try without -exact. I don't understand. I tried removing the but still got the same.

View 5 Replies View Related

General :: Running Shell Script Within Expect Script?

May 1, 2011

I Want to run below script withing expect utility

Code:
mystring "abc:-)"
mystring1=${mystring/)/.}

View 2 Replies View Related

Ubuntu :: Curly Brace Expansions Don't Work In Bash Scripts?

Jul 20, 2010

I'm trying to use a curly brace expansion in a Bash script, but it's not working for me in Ubuntu. It works in other distributions, like Arch, Fedora and Debian, and it works in Ubuntu as well, but only from the command line, not in a Bash script. I've tried it on multiple Ubuntu (10.04) machines, so it's not specific to one configuration. Here's what I did:

Code:
mkdir a b
Now this works:

[code]....

View 3 Replies View Related

Programming :: Expect Script: Send Function Key F12 In An Expect Script?

Nov 19, 2008

I'am new to expect how do i send function key F12 in an expect script?

View 1 Replies View Related

Hardware :: Kernel Double Fault, Laptop Froze On Distro / Getting Error Double Fault: 0000 [#1] SMP?

Jun 19, 2010

My laptop's been locking up in Linux (Ubuntu, Backtrack, Puppy) periodically for a while now. When it locked up, it was always immune to the magic of SysRq, which I thought might indicate a hardware problem. It became so bad that I had to stop using the laptop.

Today, when I turned it on and tried to boot into Fedora 12, I got the following error (just once, it just locked up at various points during the splash screen after this once):

double fault: 0000 [#1] SMP
last sysfs file:
CPU 0
odules linked in:
Pid: 1, co m: swapper Not ta nted 2.6.32.11-99.fc 2.x86_64 #VGN-T 250N
RIP: 0010:[<ff

All the seemingly missing letters were really missing, not my typos.

As you can see, kernel version is 2.6.32.11-99.fc12.x86_64 and my laptop is a Sony Vaio TZ 250N (Core 2 Duo ULV 1.2GHZ). Note that with the other remaining kernels from the updates, nothing ever happened other than the locking up. The core temperatures hover pretty high, about 55-60C peak but this is still below the critical temp. Memtest came up clean when the problem first started happening.

View 3 Replies View Related

Ubuntu :: Program That Shows Custom Quotes At Startup?

Jun 2, 2010

What's a good program that shows quotes at startup? Quotes that I could edit and add to?

View 6 Replies View Related

General :: Difference Between Find Name With And W/o Quotes?

Feb 17, 2011

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.

View 2 Replies View Related

General :: Add Quotes Between Words In A Cvs File?

Mar 8, 2010

I exported a spreadsheet file into cvs format.

The cvs file is formatted this way

field1,field2,field3,..etc

I want it to be in a Quote delimited format like so

"field1","field2","field3",..etc

View 2 Replies View Related

General :: Printing Single Quotes With Awk?

Jul 27, 2011

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 `''

View 3 Replies View Related

Programming :: C++: Macro Not Defined In Quotes?

Dec 12, 2009

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 << "
";

[code]....

This seems lame, because then this doesn't work:

Code:

CL_Image leaves_corner_tl(gc, "DATADIR/PACKAGE_NAME/img/leaves_corner_tl.png");

So, am I literally going to have to strcat DATADIR/PACKAGE with the other text every time I want to prefix DATADIR/PACKAGE_NAME onto another string?

View 2 Replies View Related

Ubuntu :: 10.04 - Using Pen Drive To Expand RAM

May 2, 2010

Is it possible to use a pen drive to expand the amount of ram you have? In Lucid 10.04 LTS.

View 1 Replies View Related

Ubuntu :: How To Expand Partitions

Dec 18, 2010

I want resize my partitions, i need more space for ubuntu, i already have 58gbs of free space, but i dont know how i can expand my partitions, i have tried "GParted Partition Tool", but it won't allow me to do it. The only other thing i can think of is re-installing ubuntu, and if i have to reinstall it how can i retain my settings and programs that i have installed?

View 6 Replies View Related

General :: Identify The Single Quotes As Literals?

Mar 9, 2009

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.

View 1 Replies View Related

Fedora :: Thunderbird - Cut Parts Of Nested Quotes?

Jun 24, 2011

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.

View 3 Replies View Related







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