Sponsored Content
Top Forums Shell Programming and Scripting nested double quota and white space inside variable Post 302422274 by lindazhou on Tuesday 18th of May 2010 02:50:02 AM
Old 05-18-2010
nested double quota and white space inside variable

I have a question about nested double quotes. Any help is appreciated.

Here are my commands on Mac OS.
# string="Ethernet \"USB Ethernet\" \"Bluetooth DUN\" AirPort FireWire \"Bluetooth PAN\""
# echo $string
Ethernet "USB Ethernet" "Bluetooth DUN" AirPort FireWire "Bluetooth PAN"
# networksetup -ordernetworkservices $string - This gives error.
The networksetup command requires quote around service name that has space in it.
But when shell expands the $string that has nested quotes, it treats the string that has quote around it as two separate words. In this case, "USB Ethernet" becomes 'USB' 'Ethernet'. What I really want is "USB Ethernet".
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stripping white space...

Hi All; Having a problem with a file.. the file contains the following data... (a snapshot) 1331F9E9DB7C2BB80EAEDE3A8F043B94,AL7 1DZ,M,50 186FDF93E1303DBA217279EC3671EA91,NG5 1JU,M,24 3783FFAF602015056A8CD21104B1AAAF,CH42 4NQ,M,17 It has 3 columns sepreated by a , the second column... (7 Replies)
Discussion started by: Zak
7 Replies

2. UNIX for Dummies Questions & Answers

SED with White Space

Dear Members, Suppose i have a variable test which stores a string as below: test='John drives+++++++++a+++++car' now i want to use sed on the above variable and replace + with a white space, so that i get echo $test should give me 'john drives a car' Between... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

3. Shell Programming and Scripting

sed + white space

Hi, What sed command (if sed is the right command) can remove ALL white space from my file. I have a csv, except I want to remove all white space between commas and characters. My idea (without testing) sed 's/ //g' Is there a better way? (18 Replies)
Discussion started by: mcclunyboy
18 Replies

4. Shell Programming and Scripting

awk: Eliminating white space while setting variable

Hi, I have a large flat file from host without delimiter. I'm transforming this file to a csv file using statements like # Row 03: Customer / field position 3059 +20 WOFABNAM=substr( $0, 3059, 20 ); and deleting the trailing whitespaces before and after with that sub( /^ +/, "",... (4 Replies)
Discussion started by: Celald
4 Replies

5. UNIX for Dummies Questions & Answers

filename with white space

our user creates a text file with a white space on the filename. this same file is transfered to unix via automation tool. i have a korn shell script that reads these files on a input directory and connects to oracle database to run the oracle procedures which will load the data from each of the... (2 Replies)
Discussion started by: wtolentino
2 Replies

6. Shell Programming and Scripting

Nested case inside awk

please let me know if the below code could be written efficiently inside single awk case "$INP" in ksh) cat catalog | awk 'BEGIN {FS=",";} { print $2 } END {}' ;; pset) cat catalog | awk 'BEGIN {FS=",";} { print $3 } END {}' ;; dml) cat catalog | awk 'BEGIN {FS=",";} {... (2 Replies)
Discussion started by: cvsanthosh
2 Replies

7. Shell Programming and Scripting

awk - trim white space from a field / variable

Hi, Consider the data (FS = |): 1| England |end 2| New Zealand |end 3|Australia|end 4| Some Made Up Country |end 5| West Indies|end I want the output to be (i.e. without the leading and trailing white space from $2) England New Zealand Australia Some Made Up Country West... (4 Replies)
Discussion started by: Storms
4 Replies

8. HP-UX

Unable to pass a space inside a variable shell scripting

Can anyone help me in solving this ? p=`date` e=`echo $p | awk '{print $2,$3}'` # echo $p Wed Aug 4 12:00:08 IST 2013 but when I am echoing the value of e it is giving me with one space. As shown below: # echo $e Aug 4 I need this value to be exact as found in... (6 Replies)
Discussion started by: Kits
6 Replies

9. Shell Programming and Scripting

Add white space

hi guys how can i add spacein file name with sed if strings have no space around dash input 19-20 ( 18-19 ) ABC-EFG output after add white space 19 - 20 (18 - 19 ) ABC - EFG thx in advance (2 Replies)
Discussion started by: mhs
2 Replies

10. Shell Programming and Scripting

Error with nested if within an sqlplus task inside

Hi ALL, I am receving a "strange" error using a nested if within an sql operation inside: ./dom.ksh: syntax error at line 80 : `then' unmatched This is all my script code: in bold the step receiving the error. Any help would really aprrecieted ......! **** I have tried all the... (2 Replies)
Discussion started by: AndreaCecco
2 Replies
KUE(4)							   BSD Kernel Interfaces Manual 						    KUE(4)

NAME
kue -- Kawasaki LSI KL5KUSB101B USB Ethernet driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device uhci device ohci device usb device kue Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_kue_load="YES" DESCRIPTION
The kue driver provides support for USB Ethernet adapters based on the Kawasaki LSI KL5KLUSB101B chipset. The KL5KLUSB101B supports a 128-entry multicast filter, single perfect filter entry for the station address and promiscuous mode. Packets are received and transmitted over separate USB bulk transfer endpoints. The Kawasaki chipset supports only 10Mbps half-duplex mode, hence there are no ifmedia(4) modes to select. For more information on configuring this device, see ifconfig(8). HARDWARE
The kue driver supports Kawasaki LSI KL5KLUSB101B based USB Ethernet adapters including: o 3Com 3c19250 o 3Com 3c460 HomeConnect Ethernet USB Adapter o ADS Technologies USB-10BT o AOX USB101 o ATen UC10T o Abocom URE 450 o Corega USB-T o D-Link DSB-650C o Entrega NET-USB-E45, NET-HUB-3U1E o I/O Data USB ETT o Kawasaki DU-H3E o LinkSys USB10T o Netgear EA101 o Peracom USB Ethernet Adapter o Psion Gold Port USB Ethernet adapter o SMC 2102USB, 2104USB DIAGNOSTICS
kue%d: watchdog timeout A packet was queued for transmission and a transmit command was issued, however the device failed to acknowledge the transmission before a timeout expired. kue%d: no memory for rx list The driver failed to allocate an mbuf for the receiver ring. SEE ALSO
arp(4), netintro(4), ng_ether(4), ifconfig(8) HISTORY
The kue device driver first appeared in FreeBSD 4.0. AUTHORS
The kue driver was written by Bill Paul <wpaul@ee.columbia.edu>. BUGS
The kue driver does not accumulate Ethernet collisions statistics because the Kawasaki firmware does not appear to maintain any internal sta- tistics. BSD
October 7, 2006 BSD
All times are GMT -4. The time now is 05:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy