A sed substitute command (without the g flag) only changes the first occurrence of the pattern on each line. If you add the g flag:
all occurrences of rdsk would be changed to dsk. Note that your specified desired output only changed the 1st occurrence.
On Solaris/SunOS systems, always change awk to /usr/xpg4/bin/awk (or, when internationalized REs are not being used, as in this case, nawk).
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Hi all!
I need to change the final e every time when it is present in any word in column 1 to a; moreover, to change the final i again to a in any word in column 1, but just if word in column 2 begins with ha or si.
Here below you can see a sample of my data:
achwa ungeliachwa ungeli 1... (3 Replies)
I have a file which looks like this
01081023442 220000000410629994812279000001099952504280000000000000000000000000010050000000000 0000000000 0000000000 1101211221099952504280000010704525042800120000000000000000000000000000000000001 0000000000000006000000000000815500000010000010000000000000... (2 Replies)
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
Hi,
I need help to remove tab delimited space in the $2 of a specific row. My file is like this:-
file1.txt
No_1 4 139 156
No_1 5 161 205
No_4 91 227 212
No_19 254 243 263
No_19 645 249 258
No_19 101 2492 2635
No_90 8 277 288... (5 Replies)
Dear All,
New to Linux/Unix OS, my Linux version is 2010 x86_64 x86_64 x86_64 GNU/Linux
As titled, I wonder if you can help to provide a solution to find and change an specific string in a file
The file include a lots of data in following configuration but might be various in... (3 Replies)
Hello,
I have some problem in inserting the space for the pairs of columns.
I have the input file :
I used this code below in replacing it using space in specific column (replace space in each two columns)
sed -e "s/,/ /2" -e "s/,/ /3" inputfile
Output showed :
However, I have many... (3 Replies)
Hello I have a script that searches a file for a specific string and then changes the nth column after that string. I have searched online for how to do this with sed but have not seemed to find a solution that works for me. I am using bash.
Some background info:
- Currently I am using awk to... (4 Replies)
I am trying to change the number in bold to 2400
01,000300032,193631306,190619,0640,1,80,,2/
02,193631306,000300032,1,190618,0640,CAD,2/
I'm not sure if sed or awk is the answer. I was going to use sed and do a character count up to that point, but that column directly before 0640 might... (8 Replies)
Discussion started by: juggernautjoee
8 Replies
LEARN ABOUT OPENSOLARIS
pcata
pcata(7D) Devices pcata(7D)NAME
pcata - PCMCIA ATA card device driver
SYNOPSIS
pcata@socket#:a -u
pcata@socket#:a -u,raw
DESCRIPTION
The PCMCIA ATA card device driver supports PCMCIA ATA disk and flash cards that follow the following standards:
o PC card 2.01 compliance (MBR+fdisk table required for all platforms).
o PC card ATA 2.01 compliance.
o PC card services 2.1 compliance.
The driver supports standard PCMCIA ATA cards that contain a Card Information Structure (CIS). For PCMCIA, nodes are created in /devices
that include the socket number as one component of the device name referred to by the node. However, the names in /dev, /dev/dsk, and
/dev/rdsk follow the current conventions for ATA devices, which do not encode the socket number in any part of the name. For example, you
may have the following:
+----------------+-----------------------------------+---------------------+
|Platform | /devices name | /dev/dsk name |
+----------------+-----------------------------------+---------------------+
|x86 | /devices/isa/pcic@1,3e0 /disk@0:a | /dev/dsk/c1d0s0 |
+----------------+-----------------------------------+---------------------+
|SPARC | /devices/iommu@f,e0000000 | /dev/dsk/c1d0s0 |
| | /sbus@f,e0001000 /SUNW, pcm- | |
| | cia@3,0 /disk@0:a | |
+----------------+-----------------------------------+---------------------+
PRECONFIGURATION
If a PC Card ATA device is recognized, the pcata driver is automatically loaded, IRQs allocated, devices nodes created, and special files
created (if they do not already exist).
Known Problems and Limitations
o You need to umount the file system before removing the disk.
o The ufs file systems on removable media (PC Card ATA) should have one of the onerror={panic, lock, umount} mount options set.
CONFIGURATION
Configuration topics include initial installation and configuration, identifying an unrecognized device, special files and hot-plugging.
Initial Installation and Configuration
1. Install the Solaris software.
2. Boot the system.
3. Insert the PC card ATA device.
Identifying an Unrecognized Device
If you insert a PC card ATA device and it is not recognized (no special files created), use the prtconf command to identify the problem.
1. Run the prtconf -D command to see if your pcata card is recognized. (A recognized device will appear at the end of the prtconf
output. For example:
# prtconf -D
. . .
pcic, instance #0 (driver name: pcic)
. . .
disk, instance #0
2. If pcata does not appear in the prtconf output, there is a problem with the PC card adapter configuration or with the hardware.
Check to see whether the problem is with the card or the adapter by trying to use the card on another machine and by seeing if
it works on the same machine using DOS.
Special Files
For PC card devices, nodes are created in /devices that include the socket number as one component of a device name that the node refers
to. However, the /prtc/dev names and the names in /dev/dsk and /dev/rdsk do follow the current convention for ATA devices, which do not
encode the socket number in any part of the name.
Hot-Plugging
o If you want to remove the disk, you must unmount the file system.
o Use the mkfs_pcfs(1M) command to create a pcfs file system:
# mkfs -F pcfs /dev/rdsk/c#d#p0:d
o To mount a pcfs file system, type:
# mount -F pcfs /dev/dsk/c#d#p0:c /mnt
o If you want to create a ufs file system, use the newfs command and type:
# newfs /dev/rdsk/c#d#s#
o To mount a ufs file system, type:
# mount -F ufs /dev/dsk/c#d#s# /mnt
o To create a Solaris partition, run the format command and go to the Partition menu. For more information, see the format(1M) man
page.
FILES
/kernel/drv/pcata pcata driver
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWpsdpr |
+-----------------------------+-----------------------------+
SEE ALSO format(1M), mount(1M), newfs(1M), pcmcia(7D), attributes(5), pcfs(7FS)SunOS 5.11 2 Mar 2007 pcata(7D)