09-12-2014
But what is the logic to be used in this case??
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a txt file like below:
testin.txt
AB
BC
CD
DE
I have the following awk script
BEGIN {flag1="N"}
/(AB)|(BC)|(CD)|(DE)/ {flag1="Y"}
END {print flag1}
>awk -f testin.awk testin.txt
Returns
Y (8 Replies)
Discussion started by: visakhcr
8 Replies
2. Shell Programming and Scripting
Hello world,
I was wondering if there is a nicer way to write the following code (in AWK):
awk '
FNR==NR&&$1~/^m$/{tok1=1}
FNR==NR&&$1~/^m10$/{tok1=1}
' my_file
In fact, it looks for m2, m4, m6, m8 and m10 and then return a positive flag. The problem is how to define 10 thanks... (3 Replies)
Discussion started by: jolecanard
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
It can be used awk inside other Awk?. I need to get another text processing while other text process.
Thank you. (2 Replies)
Discussion started by: pepeli30
2 Replies
4. Shell Programming and Scripting
Hi,
I am trying to do evaluate one numerical string after substitution.
++++++++++++++++==
What I have = "7.04+2.3Xlog(0.72e-6X1.0e6)X1.9596"
What I need = evaluate 7.04+2.3*log(0.72e-6*1.0e6)*1.9596 = 5.55941
what I am doing;
echo "7.04+2.3Xlog(0.72e-6X1.0e6)X1.9596" | awk... (2 Replies)
Discussion started by: vivek_shm74
2 Replies
5. Shell Programming and Scripting
I have the following simplified code that I am planning on putting into a larger shell script. I have been butchering it to try and make work amongst google searches and reading awk documentation.
amixer sset Master toggle | awk '{ if ( /^ Front Left/ { print $7 } == // ) print "MUTED" }'I... (2 Replies)
Discussion started by: jelloir
2 Replies
6. Shell Programming and Scripting
Hi,
Could somebody help me in understanding the following awk expression:
awk -v n="POINT" '/%/{print $0 "\n" n ;next}1' < file name
Thanks,
Arun (6 Replies)
Discussion started by: arun_maffy
6 Replies
7. Shell Programming and Scripting
Hello,
I have big files which I wanna filter them based on first column.
first column should be one of these strings: chr2L || chr2R || chr3L || chr3R || chr4 || chrX
and something like chr2Lh or chrY or chrM3L is not accepted.
I used the following command:
awk '{ if ($1=="chr2L" ||... (5 Replies)
Discussion started by: @man
5 Replies
8. Shell Programming and Scripting
Hi All,
I have a doubt in awk print exp.
Where in some awk commands have seen a digit 1 appended at the end of the awk ,didnt remember the command .
like ..
cat file |awk '{print }1'
Could some one help in understanding these cases where we use them.
Regards,
Ganesh, (2 Replies)
Discussion started by: rmkganesh
2 Replies
9. Shell Programming and Scripting
I am trying to write a simple function to select values from a database and assign them to variables. It can have any number of arguments sent into it, and I want to assign the value retrieved to a different variable name for each argument sent in. So my code looks something like this:
... (6 Replies)
Discussion started by: DJR
6 Replies
10. UNIX for Advanced & Expert Users
I have to display only those subscribers which are in "unconnected state" and the date is 90 days older than today's date.
Below command is used for this purpose:
cat vfsubscriber_20170817.csv | sed -e 's/^"//' -e '1d' | \
nawk -F '",' '{if ( (substr($11,2,4) == 2017) && ( substr($11,2,8)... (1 Reply)
Discussion started by: dia
1 Replies
LEARN ABOUT OPENSOLARIS
lsimega
lsimega(7D) lsimega(7D)
NAME
lsimega - SCSI HBA driver for LSI MegaRAID 320-2x SCSI RAID Controller
The lsimega SCSI RAID host bus adapter driver is a SCSA-compliant nexus driver that supports LSI MegaRAID 320-2x SCSI RAID devices.
The lsimega driver supports standard functions provided by the SCSA interface, including RAID disk I/O and passthrough I/O to support
SCSI tape and CDROM.
DRIVER CONFIGURATION
The lsimega.conf file contains no user configurable parameters. Please configure your hardware through BIOS.
The LSI MegaRAID 320-2x device can support up to 40 logic drivers. Note that BIOS numbers the logic drives as 1 through 40, however in
Solaris these drives are numbered from 0 to 39.
See attributes(5) for a description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability | |
+-----------------------------+-----------------------------+
FILES
/kernel/drv/lsimega
32-bit ELF kernel module.
/kernel/drv/amd64/lsimega
64-bit kernel module ( only).
/kernel/drv/lsimega.conf
Driver configuration file (contains no user-configurable options).
prtconf(1M), attributes(5), amr(7D), scsi_hba_attach(9F), scsi_sync_pkt(9F), scsi_transport(9F), scsi_inquiry(9S), scsi_device(9S),
scsi_pkt(9S)
Small Computer System Interface-2 (SCSI-2)
20 April 2005 lsimega(7D)