Visit Our UNIX and Linux User Community

Full Discussion: To quote or not
Top Forums UNIX for Dummies Questions & Answers To quote or not Post 302844140 by g.j.huebschman on Friday 16th of August 2013 04:13:20 PM
Old 08-16-2013
Thanks for the expanded explanation

I had tried something similar and got a syntax error (about a missing conjunction) as you said:
-rw-r--r--    1 root     system            0 Aug 16 11:20 test
-rw-r--r--    1 root     system            0 Aug 16 11:20 2test
-rw-r--r--    1 root     system            0 Aug 16 11:20 2test2
-rw-r--r--    1 root     system            0 Aug 16 11:20 22test
-rw-r--r--    1 root     system            0 Aug 16 11:20 22test22

Thanks for teaching a man to fish.
Test Your Knowledge in Computers #883
Difficulty: Easy
A computer security vulnerability is a weakness in design, implementation, operation or internal control.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capturing Data between first quote and next quote

I have input file like RDBMS FALIURE UTY8703 'USER_WORK.TEST' .HIghest return code '12' I want to parse data which comed between first quote till next quote USER_WORK.TEST can you please suggest how to do that (4 Replies)
Discussion started by: scorp_rahul23
4 Replies

2. Shell Programming and Scripting

double-quote inside double-quote

hey all, i made a simple .sh like this: echo "<style media="screen" type="text/css">@import url("main.css");</style>" but the output is: <style media=screen type=text/css>@import url(main.css);</style> i want to keep double-quotes, can anyone help me? thanks (3 Replies)
Discussion started by: indraf
3 Replies

3. Shell Programming and Scripting

Quote and variable

The command line bellow works fine by itself. /opt/csw/bin/rsync -azq --delete -e "ssh -i /.ssh/ss" /home/ Now I would like to introduce some variable into it and make a .sh file such as bellow and it does not work anymore. I guess the part -e "ssh -i /.ssh/ss" has... (4 Replies)
Discussion started by: ngungo
4 Replies

4. Shell Programming and Scripting

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

Hi, I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file: Name = "abc" The regex I'm using to match the same is: egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies

5. Shell Programming and Scripting

replacing a quote in some lines with multiple quote fields

i want to replace mistaken quotes in line starting with tag 300 and relocate the quote in the correct position so the input is 223;25 224;20100428064823;1;0;0;0;0;0;0;0;8;1;3;9697;18744;;;;;;;;;;;; 300;X;Event:... (3 Replies)
Discussion started by: wradwan
3 Replies

6. Shell Programming and Scripting

getting value between double quote

Can somebody supply me with a simple way to get a value between two double quotes? Example: input = ADR base is "/u01/app/oracle" output = /u01/app/oracle Thanks to all who answer (4 Replies)
Discussion started by: BeefStu
4 Replies

7. Shell Programming and Scripting

Replacing Double Quote in Double Quote incsv file

Hi All , We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file XLs data : ... (2 Replies)
Discussion started by: Shalini Badal
2 Replies

8. Shell Programming and Scripting

Replacing all but the first and last double quote in a line with a single quote with awk

From: 1,2,3,4,5,This is a test 6,7,8,9,0,"This, is a test" 1,9,2,8,3,"This is a ""test""" 4,7,3,1,8,"""" To: 1,2,3,4,5,This is a test 6,7,8,9,0,"This; is a test" 1,9,2,8,3,"This is a ''test''" 4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies

9. What is on Your Mind?

A terrific quote:

Food for thought! """ Everybody in this country should learn to program a computer...because it teaches you how to think. """ Steve Jobs. So, SO, true! Merry XMAS all... (4 Replies)
Discussion started by: wisecracker
4 Replies
ports(1M)						  System Administration Commands						 ports(1M)

ports - creates /dev entries and inittab entries for serial lines SYNOPSIS
/usr/sbin/ports [-r rootdir] DESCRIPTION
devfsadm(1M) is now the preferred command for /dev and /devices and should be used instead of ports. The ports command creates symbolic links in the /dev/term and /dev/cua directories to the serial-port character device files in /devices and adds new entries in /etc/inittab for non-system ports found. System-board ports are given single lower-case letters for names (such as a and b) while other ports are named numerically. ports searches the kernel device tree to find the serial devices attached to the system. It also checks /dev/term and /dev/cua to see what symbolic links to serial devices already exist. ports then performs the following: 1. Assigns new numbers (or letters for system-board ports) to ports that are attached to the system but do not have /dev/term and /dev/cua entries. The numbers or letters assigned are the lowest-unused numbers or letters. 2. Removes dangling links: links from /dev/term and /dev/cua pointing to no-longer-existing ports. 3. Creates new /dev/term and /dev/cua links for new serial devices. 4. Invokes sacadm(1M) to make new port monitor entries for the new devices. This is not done automatically for on-board ports; on worksta- tions these ports are often not used for dial-in sessions, so a port-monitor for one of these ports must be created explicitly. If the configuration has not changed, ports exits without doing anything. Notice to Driver Writers ports considers devices with a node type of DDI_NT_SERIAL, DDI_NT_SERIAL_MB, DDI_NT_SERIAL_DO, or DDI_NT_SERIAL_MB_DO to be serial port devices. Devices with one of these node types must create minor device names that obey the following conventions when calling ddi_cre- ate_minor_node(9F). o The minor name for non-system port devices (DDI_NT_SERIAL) consists of an ASCII numeric string, where the first port on the device is named 0, the second named 1, the third named 2, up to the number of ports provided by the device. o The minor name for non-system dialout devices (DDI_NT_SERIAL_DO) is the ASCII numeric port name, concatenated with ,cu. For example, the minor name for the first dialout port on the serial board is 0,cu. o The minor name for system-board port devices (DDI_NT_SERIAL_MB) consists of a string containing a single ASCII lowercase character, where the first port on the device is named a, the second is named b, the third is named c, for all ports on the device (or up through port z). o The minor name for system-board dialout devices (DDI_NT_SERIAL_MB_DO) consists of the lowercase character port name, concatenated with ,cu. For example, the minor name for the first dialout port on the on-board serial device is a,cu. To prevent disks from attempting to automatically generate links for a device, drivers must specify a private node type and refrain from using one of the above node types when calling ddi_create_minor_node(9F). OPTIONS
The following options are supported: -r rootdir Causes ports to presume that the /dev/term, /dev/cua, and /devices directories are found under rootdir, not directly under /. If this argument is specified, sacadm(1M) is not invoked, since it would update terminal administration files under /etc without regard to the rootdir. EXAMPLES
Example 1: Creating the Serial and Dialout Minor Device Nodes The following example creates the serial and dialout minor device nodes from the xkserial driver's attach(9E) function: /* * Create the minor number by combining the instance number * with the port number. */ #define XKNUMPORTS 8 #define XKMINORNUM(i, p) ((i) << 4 | (p)) #define XKMINORNUM_DO(i, p) ((i) << 4 | (p) | 0x80) int xkserialattach(dev_info_t *dip, ddi_attach_cmd_t cmd) { int instance, portnum; char name[8]; /* other stuff in attach... */ instance = ddi_get_instance(dip); for (portnum = 0; portnum < XKNUMPORTS; portnum++) { /* * create the serial port device */ sprintf(name, "%d", portnum); ddi_create_minor_node(dip, name, S_IFCHR, XKMINORNUM(instance, portnum), DDI_NT_SERIAL, 0); /* * create the dialout device */ sprintf(name,"%d,cu", portnum); ddi_create_minor_node(dip, name, S_IFCHR, XKMINORNUM_DO(instance, portnum), DDI_NT_SERIAL_DO, 0); } } Example 2: Installing the xkserial Port Driver on a Sun Fire 4800 The following example installs the xkserial port driver on a Sun Fire 4800 (with the driver controlling the fictional XKSerial 8 port serial board), with these special files in /devices: # ls -l /devices/ssm@0,0/pci@18,700000/pci@1/xkserial@f,800000/ crw-r----- 1 root sys 32, 16 Aug 29 00:02 xkserial@2000:0 crw-r----- 1 root sys 32, 144 Aug 29 00:02 xkserial@2000:0,cu crw-r----- 1 root sys 32, 17 Aug 29 00:02 xkserial@2000:1 crw-r----- 1 root sys 32, 145 Aug 29 00:02 xkserial@2000:1,cu crw-r----- 1 root sys 32, 18 Aug 29 00:02 xkserial@2000:2 crw-r----- 1 root sys 32, 146 Aug 29 00:02 xkserial@2000:2,cu crw-r----- 1 root sys 32, 19 Aug 29 00:02 xkserial@2000:3 crw-r----- 1 root sys 32, 147 Aug 29 00:02 xkserial@2000:3,cu crw-r----- 1 root sys 32, 20 Aug 29 00:02 xkserial@2000:4 crw-r----- 1 root sys 32, 148 Aug 29 00:02 xkserial@2000:4,cu crw-r----- 1 root sys 32, 21 Aug 29 00:02 xkserial@2000:5 crw-r----- 1 root sys 32, 149 Aug 29 00:02 xkserial@2000:5,cu crw-r----- 1 root sys 32, 22 Aug 29 00:02 xkserial@2000:6 crw-r----- 1 root sys 32, 150 Aug 29 00:02 xkserial@2000:6,cu crw-r----- 1 root sys 32, 23 Aug 29 00:02 xkserial@2000:7 crw-r----- 1 root sys 32, 151 Aug 29 00:02 xkserial@2000:7,cu /dev/term contain symbolic links to the serial port device nodes in /devices # ls -l /dev/term /dev/term/0 -> ../../devices/[....]/xkserial@2000:0 /dev/term/1 -> ../../devices/[....]/xkserial@2000:1 /dev/term/2 -> ../../devices/[....]/xkserial@2000:2 /dev/term/3 -> ../../devices/[....]/xkserial@2000:3 /dev/term/4 -> ../../devices/[....]/xkserial@2000:4 /dev/term/5 -> ../../devices/[....]/xkserial@2000:5 /dev/term/6 -> ../../devices/[....]/xkserial@2000:6 /dev/term/7 -> ../../devices/[....]/xkserial@2000:7 and /dev/cua contain symbolic links to the dialout port device nodes in /devices # ls -l /dev/cua /dev/cua/0 -> ../../devices/[....]/xkserial@2000:0,cu /dev/cua/1 -> ../../devices/[....]/xkserial@2000:1,cu /dev/cua/2 -> ../../devices/[....]/xkserial@2000:2,cu /dev/cua/3 -> ../../devices/[....]/xkserial@2000:3,cu /dev/cua/4 -> ../../devices/[....]/xkserial@2000:4,cu /dev/cua/5 -> ../../devices/[....]/xkserial@2000:5,cu /dev/cua/6 -> ../../devices/[....]/xkserial@2000:6,cu /dev/cua/7 -> ../../devices/[....]/xkserial@2000:7,cu FILES
/dev/term/n Logical serial port devices /dev/cua/n Logical dialout port devices /etc/inittab /etc/saf/* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability | SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
add_drv(1M), devfsadm(1M), drvconfig(1M), pmadm(1M), sacadm(1M), attributes(5), devfs(7FS), attach(9E), ddi_create_minor_node(9F) Writing Device Drivers SunOS 5.10 8 Nov 2002 ports(1M)

Featured Tech Videos

All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy