Sponsored Content
Full Discussion: Converting grep to awk
Top Forums Shell Programming and Scripting Converting grep to awk Post 302646565 by dagamier on Friday 25th of May 2012 09:39:44 AM
Old 05-25-2012
These are the striings i'm trying to match.

Code:
(c-ab123, 897)
(c-ab123 897)
897//a-1234
;a-cdef;897
:a-cdef:897
,a-cdef,897
/a-cdef897
a-cdef 897
SN:a-c123 897
SN=a-cdef 897
SN-a-cdef 897

these all appear in field 9 of my data file which is why my samples all showed me comparing that field

---------- Post updated at 06:39 AM ---------- Previous update was at 06:36 AM ----------

To be more clear, I'm looking for the
Code:
c-ab123, 897

info inside of each string
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting a line into a list using awk or sed

Hello, I am trying to convert a line into a list using awk or sed. Line: 345 897 567 098 123 output: 345 897 567 098 123 thanks (7 Replies)
Discussion started by: smarones
7 Replies

2. UNIX for Dummies Questions & Answers

Converting HP-UX awk to Solaris

Hi, I am using awk in HP-UX to enter an encrypted entry of the password into /etc/passwd with success, this is the command I am using and it is working great. cat /tmp/passwd.gal.before|awk -F: -v gal_passwd="encrypted_password" '{OFS=":" ; print $1,gal_passwd,$3,$4,$5,$6,$7}' >... (3 Replies)
Discussion started by: galuzan
3 Replies

3. Shell Programming and Scripting

Converting txt file into CSV using awk or sed

Hello folks I have a txt file of information about journal articles from different fields. I need to convert this information into a format that is easier for computers to manipulate for some research that I'm doing on how articles are cited. The file has some header information and then details... (8 Replies)
Discussion started by: ksk
8 Replies

4. Shell Programming and Scripting

Converting to matrix-like file using AWK

Hi, Needs for statistics, doing converting Here is a sample file Input : 1|A|17,94 1|B|22,59 1|C|56,93 2|A|63,71 2|C|23,92 5|B|19,49 5|C|67,58 expecting something like that Output : 1|A|17,94|B|22,59|C|56,93 2|A|63,71|B|0|C|23,92 5|A|0|B|19,49|C|67,58 (11 Replies)
Discussion started by: fastlane3000
11 Replies

5. Shell Programming and Scripting

awk - problems by converting date-format

Hi i try to change the date-format from DD/MM/YYYY into MM/DD/YY. Input-Data: ... 31/12/2013,23:40,198.00,6.20,2,2,2,1,11580.0,222 31/12/2013,23:50,209.00,7.30,2,2,3,0,4380.0 01/01/2014,00:00,205.90,8.30,2,2,3,1,9360.0,223 ... Output-Data should be: ...... (7 Replies)
Discussion started by: IMPe
7 Replies

6. Shell Programming and Scripting

Converting awk script from bash to csh

I have the following script set up and working properly in bash. It basically copies a set of lines which match "AS1100002" from one file and replaces the same lines in another file. awk -vN=AS1100002* 'NR==FNR { if($1 ~ N)K=$0; next } { if($1 in K) $0=K; print }' $datadir/file1... (7 Replies)
Discussion started by: ncwxpanther
7 Replies

7. Shell Programming and Scripting

Converting shell/awk to ruby

any idea on how to get started with this: shell script: awk '/{/,/}/' ~/newservices.txt | while read line do BEGIN=$(echo "${line}" | egrep ":" | egrep "{") if ; then checkname=$(echo $line | awk -F":" '{print $1}' | sed 's_"__g') echo "{"... (1 Reply)
Discussion started by: SkySmart
1 Replies

8. Shell Programming and Scripting

Using awk for converting xml to txt

Hi, I have a xml script, I converted it to .txt with values comma seperated using awk function. But I want the output values should be inside double quotes My xml script (Workorders.xml) is shown like below: <?xml version="1.0" encoding="utf-8" ?> <scbm-extract version="3.3">... (8 Replies)
Discussion started by: Viswanatheee55
8 Replies

9. UNIX for Beginners Questions & Answers

Converting awk to perl

Hello. I'm trying to convert an awk script I wrote to perl (which I just started self-teaching). I tried the a2p command but I couldn't make sense of most of it. Here was the awk code: BEGIN{ FS = "," print "NAME\tLOW\tHIGH\tAVERAGE" a=0 } { if(a==0){ a+=1 (1 Reply)
Discussion started by: Eric7giants
1 Replies

10. UNIX for Beginners Questions & Answers

Converting awk to perl

Hello. I'm currently teaching myself Perl and was trying to turn an awk code that I had written into Perl. I have gotten stuck on a particular part and a2p has not helped me at all. The task was to take a .csv file containing a name, assignment type, score and points possible and compute it into a... (1 Reply)
Discussion started by: Eric7giants
1 Replies
SYM(4)							   BSD Kernel Interfaces Manual 						    SYM(4)

NAME
sym -- NCR/Symbios/LSI Logic 53C8XX PCI SCSI host adapter driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device pci device scbus device sym To disable PCI parity checking (needed for broken bridges): options SYM_SETUP_PCI_PARITY=<boolean> To control driver probing against HVD buses: options SYM_SETUP_SCSI_DIFF=<bit combination> To control chip attachment balancing between the ncr driver and this driver: options SYM_SETUP_LP_PROBE_MAP=<bit combination> Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): sym_load="YES" DESCRIPTION
This driver provides support for the Symbios/LSI Logic 53C8XX PCI SCSI controllers. Driver features include support for wide SCSI busses and fast10, fast20, fast40 and fast80-dt synchronous data transfers depending on con- troller capabilities. It also provides generic SCSI features such as tagged command queueing and auto-request sense. This driver is config- ured by default for a maximum of 446 outstanding commands per bus, 8 LUNs per target and 64 tagged tasks per LUN. These numbers are not so much limited by design as they are considered reasonable values for current SCSI technology. These values can be increased by changing appropriate constants in driver header files (not recommended). This driver supports the entire Symbios 53C8XX family of PCI SCSI controllers. It also offers the advantage of architectural improvements available only with newer chips. sym notably handles phase mismatch from SCRIPTS for the 53C896, 53C895A, and 53C1010 cores. As a result, it guarantees that no more than 1 interrupt per IO completion is delivered to the CPU, and that the SCRIPTS processor is never stalled waiting for CPU attention in normal sit- uations. sym also uses LOAD/STORE SCRIPTS instructions for chips that support it. Only the early 810, 815 and 825 NCR chips do not support LOAD/STORE. Use of LOAD/STORE instead of MEMORY MOVE allows SCRIPTS to access IO registers internal to the chip (no external PCI cycles). As a result, the driver guarantees that no PCI self-mastering will occur for chips that support LOAD/STORE. LOAD/STORE instructions are also faster than MEMORY MOVE because they do not involve the chip DMA FIFO and are coded on 2 DWORDs instead of 3. For the early NCR 810, 815 and 825 chips, the driver uses a separate SCRIPTS set that uses MEMORY MOVE instructions for data movements. This is because LOAD/STORE are not supported by these chips. HVD/LVD capable controllers (895, 895A, 896, and 897) report the actual bus mode in the STEST4 chip IO registers. This feature allows the driver to safely probe against bus mode and to set up the chip accordingly. By default the driver only supports HVD for these chips. For other chips that can support HVD but not LVD, the driver has to probe implementation dependent registers (GPIO) in order to detect HVD bus mode. Only HVD implementations that conform with Symbios Logic recommendations can be detected by the driver. When the SYM_SETUP_SCSI_DIFF kernel option is assigned a value of 1, the driver will also probe against HVD for 825a, 875, 876 and 885 chips, assuming Symbios Logic com- patible implementation of HVD. When the SYM_SETUP_PCI_PARITY is assigned a value of 0, the driver will not enable PCI parity checking for 53C8XX devices. PCI parity check- ing should not be an option for PCI SCSI controllers, but some systems have been reported to fail using 53C8XX chips, due to spurious or per- manent PCI parity errors detected. This option is supplied for convenience but it is neither recommended nor supported. The generic ncr(4) driver also supports SYM53C8XX based PCI SCSI controllers, except for the SYM53C1010, which is only supported by the sym driver. By default, when both the ncr(4) and sym drivers are configured, the sym driver takes precedence over the ncr(4) driver. The user can indi- cate a balancing of chip types between the two drivers by defining the SYM_SETUP_LP_PROBE_MAP kernel configuration option as follows: Bit Devices to be attached by ncr instead 0x01 53C810a, 53C860 0x02 53C825a, 53C875, 53C876, 53C885, 53C895 0x04 53C895a, 53C896, 53C897, 53C1510d 0x40 53C810, 53C815, 53C825 For example, if SYM_SETUP_LP_PROBE_MAP is supplied with the value 0x41, the ncr(4) driver will attach to 53C810, 53C815, 53C825, 53C810a, and 53C860 based controllers, and the sym driver will attach to all other 53C8XX based controllers. When only the sym driver is configured, the SYM_SETUP_LP_PROBE_MAP option has no effect. Thus, in this case, the sym driver will attach all 53C8XX based controllers present in the system. This driver offers other options that are not currently exported to the user. They are defined and documented in the sym_conf.h driver file. Changing these options is not recommended unless absolutely necessary. Some of these options are planned to be exported through sysctl(3) or an equivalent mechanism in a future driver releases and therefore, no compatibility is guaranteed. At initialization, the driver tries to detect and read user settings from controller NVRAM. The Symbios/Logic NVRAM layout and the Tekram NVRAM layout are currently supported. If the reading of the NVRAM succeeds, the following settings are taken into account and reported to CAM: Host settings Symbios Tekram SCSI parity checking Y N Host SCSI ident Y Y Verbose messages Y N Scan targets hi-lo Y N Avoid SCSI bus reset Y N Device settings Symbios Tekram Synchronous period Y Y SCSI bus width Y Y Queue tag enable Y Y Number of tags NA Y Disconnect enable Y Y Scan at boot time Y N Scan LUN Y N Devices that are configured as disabled for 'scan' in the NVRAM are not reported to CAM at system start-up. They can be discovered later using the 'camcontrol rescan' command. The table below summarizes the main features and capabilities of the NCR/Symbios/LSI Logic 53C8XX family of PCI SCSI controllers. Chip Sync Width SRAM PCI64 Supported sym53c810 10MHz 8Bit N N Y sym53c810a 10MHz 8Bit N N Y sym53c815 10MHz 8Bit N N Y sym53c825 10MHz 16Bit N N Y sym53c825a 10MHz 16Bit 4KB N Y sym53c860 20MHz 8Bit N N Y sym53c875 20MHz 16Bit 4KB N Y sym53c876 20MHz 16Bit 4KB N Y sym53c885 20MHz 16Bit 4KB N Y sym53c895 40MHz 16Bit 4KB N Y sym53c895A 40MHz 16Bit 8KB N Y sym53c896 40MHz 16Bit 8KB Y Y sym53c897 40MHz 16Bit 8KB Y Y sym53c1510D 40MHz 16Bit 4KB Y Y sym53c1010 80MHz 16Bit 8KB Y Y HARDWARE
The sym driver provides support for the following Symbios/LSI Logic PCI SCSI controllers: o 53C810 o 53C810A o 53C815 o 53C825 o 53C825A o 53C860 o 53C875 o 53C876 o 53C895 o 53C895A o 53C896 o 53C897 o 53C1000 o 53C1000R o 53C1010-33 o 53C1010-66 o 53C1510D The SCSI controllers supported by sym can be either embedded on a motherboard, or on one of the following add-on boards: o ASUS SC-200, SC-896 o Data Technology DTC3130 (all variants) o DawiControl DC2976UW o Diamond FirePort (all) o I-O DATA SC-UPCI (PC-98) o Logitec LHA-521UA (PC-98) o NCR cards (all) o Symbios cards (all) o Tekram DC390W, 390U, 390F, 390U2B, 390U2W, 390U3D, and 390U3W o Tyan S1365 MISC
The DEC KZPCA-AA is a rebadged SYM8952U. SEE ALSO
cd(4), da(4), ncr(4), sa(4), scsi(4), camcontrol(8) HISTORY
The sym driver appeared in FreeBSD 4.0. AUTHORS
The sym driver was written by Gerard Roudier and is derived from the Linux sym53c8xx driver from the same author. The sym53c8xx driver is derived from the ncr53c8xx driver, which was ported from the FreeBSD ncr(4) driver to Linux-1.2.13. The original ncr(4) driver was written for 386BSD and FreeBSD by Wolfgang Stanglmeier and Stefan Esser. BUGS
No known bugs. BSD
August 19, 2004 BSD
All times are GMT -4. The time now is 08:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy