i'm new to shell scripting and have a problem please help me
in the script i have a nawk block which has a variable count
nawk{
.
.
.
count=count+1
print count
}
now i want to access the value of the count variable outside the awk block,like..
s=`expr count / m`
(m is... (5 Replies)
Is it possible to make the search in regular exprecion or in matching parts of sed, nawk and others to IGNORE the case of the search string?
I mean, like if used 'grep' with -i option:
> grep -i "abc" file
I would like to be able to do the same, say, by nawk:
> nawk '/abc/ {print $0}'... (4 Replies)
Hi,
I am new to awk/nawk, needs help.
I want to merge the rows having emplid attribute same into a single row in the following file. In actual this kind of file will have around 50k rows.
Here is my input file
id|emplid|firstname|dep|lastname
1|001234|test|1001|1
2|002345|test|1032|2... (7 Replies)
hi everyone
suppose my input file is
ABC-12345
ABCD-12345
BCD-123456
i want to search the specific pattern which looks like
-
in a file so i used this command
cat $file | awk ' { if ($0 ~ /-/) { print } }'
so it gives me the result as
ABCD-12345
BCD-12345
BCD-12345
... (31 Replies)
Hi Gurus,
I am struggling with nawk command where i am processing a file based on columns.
Here is the sample data file.
UM113570248|24-AUG-11|4|man1|RR211 Alert: Master Process failure |24-AUG-11
UM113570624|24-AUG-11|4|man1| Alert: Pattern 'E_DCLeDAOException' found |24-AUG-11... (7 Replies)
Hi again,
I'm looking for some help with nawk, I can print a line which has a regex match in it from a file using /pattern/ but I'm looking for a way to only print the $tring which contains the pattern, rather than the whole line.
This $tring may be of variable length, may occur at any point... (1 Reply)
I have a file that looks like this:
cat includes
CORP-CRASHTEST-BU
e:\crashplan\
CORP-TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
CORP-LABS_TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
What I want to do is make three new files with just those selections. So the three... (4 Replies)
Hi.. i am running nawk scripts on solaris system to get records of file1 not in file2 and find duplicate records in a while with the following scripts -compare
nawk 'NR==FNR{a++;next;} !a {print"line"FNR $0}' file1 file2duplicate - nawk '{a++}END{for(i in a){if(a-1)print i,a}}' file1in the middle... (12 Replies)
Using a bash for loop to pass variables into a nawk loop to capture a string in an sftp log. Tried several different syntax methods to have the variable treated as a regex so the loop will capture the string.
for i in `cat /tmp/dar3.out.2`
do
nawk -vst=$i '$5 ~ /$st/ && /closed/ && /user/... (3 Replies)
Discussion started by: smenago
3 Replies
LEARN ABOUT NETBSD
arcmsr
ARCMSR(4) BSD Kernel Interfaces Manual ARCMSR(4)NAME
arcmsr -- Areca Technology Corporation SATA/SAS RAID controller
SYNOPSIS
arcmsr* at pci? dev ? function ?
DESCRIPTION
The arcmsr driver provides support for the PCI-X and PCI Express RAID controllers from Areca Technology Corporation:
- ARC-1110 PCI-X 4 Port SATA RAID Controller
- ARC-1110ML PCI-X 4 Port SATA RAID Controller
- ARC-1120 PCI-X 8 Port SATA RAID Controller
- ARC-1120ML PCI-X 8 Port SATA RAID Controller
- ARC-1130 PCI-X 12 Port SATA RAID Controller
- ARC-1130ML PCI-X 12 Port SATA RAID Controller
- ARC-1160 PCI-X 16 Port SATA RAID Controller
- ARC-1160ML PCI-X 16 Port SATA RAID Controller
- ARC-1170 PCI-X 24 Port SATA RAID Controller
- ARC-1200 Rev A PCI Express 2 Port SATA RAID Controller
- ARC-1202 PCI Express 2 Port SATA RAID Controller
- ARC-1210 PCI Express 4 Port SATA RAID Controller
- ARC-1220 PCI Express 8 Port SATA RAID Controller
- ARC-1230 PCI Express 12 Port SATA RAID Controller
- ARC-1230ML PCI Express 12 Port SATA RAID Controller
- ARC-1231ML PCI Express 12 Port SATA RAID Controller
- ARC-1260 PCI Express 16 Port SATA RAID Controller
- ARC-1260ML PCI Express 16 Port SATA RAID Controller
- ARC-1261ML PCI Express 16 Port SATA RAID Controller
- ARC-1280 PCI Express 24 Port SATA RAID Controller
- ARC-1280ML PCI Express 24 Port SATA RAID Controller
- ARC-1680 PCI Express 8 Port SAS RAID Controller
- ARC-1680LP PCI Express 8 Port SAS RAID Controller
- ARC-1680i PCI Express 8 Port SAS RAID Controller
- ARC-1680x PCI Express 8 Port SAS RAID Controller
- ARC-1681 PCI-X 8 Port SAS RAID Controller
These controllers support RAID levels 0, 1, 1E, 3, 5, 6, and JBOD using either SAS or SATA II drives.
arcmsr supports management and monitoring of the controller through the bioctl(8) and envstat(8) commands.
Please note, however, that to use some features that require special privileges, such as creating/removing hot-spares, pass-through disks or
RAID volumes will require to have the password disabled in the firmware; otherwise a Permission denied error will be reported by bioctl(8).
When a RAID 1 or 1+0 volume is created, either through the bioctl(8) command or controller's firmware, the volume won't be accessible until
the initialization is done. A way to get access to the sd(4) device that corresponds to that volume without rebooting, is to issue the fol-
lowing command (once the initialization is finished):
$ scsictl scsibus0 scan any any
The arcmsr driver will also report to the kernel log buffer any error that might appear when handling firmware commands, such as used by the
bioctl(8) command.
EVENTS
The arcmsr driver is able to send events to powerd(8) if a volume or any drive connected to the volume is not online. The state-changed
event will be sent to the /etc/powerd/scripts/sensor_drive script when such condition happens.
SEE ALSO intro(4), pci(4), scsi(4), sd(4), bioctl(8), envstat(8), powerd(8), scsictl(8)HISTORY
The arcmsr driver first appeared in NetBSD 5.0.
AUTHORS
The arcmsr driver was originally written for OpenBSD by David Gwynne. It was ported to NetBSD and extended by Juan Romero Pardines.
BSD March 3, 2008 BSD