Search & Replace regex Perl one liner to AWK one liner
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between non-word characters on its own line
then I'd like to remove the first non-word character in front of "sandwiched" ISAs or put another way put "sandwiched" ISAs at the beginning of the line
How would I do this in awk? Thanks so much for help, I really do appreciate it. Please let me know if I can explain this more clearly or if you need data examples.
Hi
I am trying to search and replace a multi line pattern in a php file using awk.
The pattern starts with
<div id="navbar">
and ends with
</div>
and spans over an unknown number of lines.
I need the command to be a one liner.
I use the "record separator" like this :
awk -v... (8 Replies)
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Hi, I'm writing a ksh script and trying to use an awk / sed / or perl one-liner to remove the last 4 characters of a line in a file if it begins with a period.
Here is the contents of the file... the column in which I want to remove the last 4 characters is the last column. ($6 in awk). I've... (10 Replies)
can someone help me translate the following command, from:
/usr/bin/awk "/^$TOFDAYM $TOFDAYD /,0" $LOGFILE
to something like
perl -e .....
basically, i want to use perl to do awk functions within a shell script. i want to do the above awk, using perl.
any suggestions? (9 Replies)
I have an array containing bunch of characters. I have to check this array for specific character and if "Not Found than" use a goto statement to go to USAGE
set options = (A B C D E F)
@ i = 0
while ($i <= ${#options})
if ($options != "F" || $options != "D") then
goto USAGE
endif
@... (1 Reply)
hello,
I want to replace awk with a perl one liner in unix.
i use in awk REGEX and FS ( field separator) because
awk syntaxes in different unix os versions have not the same behaviour.
Awk, Nawk and GNU Awk Cheat Sheet - good coders code, great reuse
i have a file named "file" and want... (5 Replies)
Not quite a unix question but problem in a perl command. Taking a chance if someone knows about the error
cat 1
a b c d
perl -p -e 's/a/b/g' 1
b b c d
What is the problem here??
perl -p -i -e 's/a/b/g' 1
Can't remove 1: Text file busy, skipping file. (2 Replies)
Hi,
I am a newbie to awk. Here is my problem. Looking for an awk 1-liner to solve it:
My Computing Environment:
- Solaris10
- I prefer to use csh or sh shells
1. Lets say my input file is File1.dat (delimter = | ) and looks as follows:
(File1.dat)
... (1 Reply)
hi,
I am using PERL one liner for oracle database connection as :
$PERL -e "use DBI; DBI->connect(qw(DBI:Oracle:SID user passwd));"
is there a way to append select statement to this connection ? i.e. DB connection and select stmt in one line ?
how to do sysdba connection using one lines... (1 Reply)
Discussion started by: talashil
1 Replies
LEARN ABOUT LINUX
aic
AIC(4) BSD/i386 Kernel Interfaces Manual AIC(4)NAME
aic -- Adaptec AIC-6260 and AIC-6360 SCSI driver
SYNOPSIS
device aic
In /boot/device.hints:
hint.aic.0.at="isa"
DESCRIPTION
The aic driver provides support for the Adaptec AIC-6260 and AIC-6360 SCSI controller chips. Many systems that use these controller chips do
not have a boot ROM and therefore cannot be booted from.
HARDWARE
The adapters supported by the aic driver include:
o Adaptec AHA-1505 (ISA)
o Adaptec AHA-1510A, AHA-1510B (ISA)
o Adaptec AHA-1520A, AHA-1520B (ISA)
o Adaptec AHA-1522A, AHA-1522B (ISA)
o Adaptec AHA-1535 (ISA)
o Creative Labs SoundBlaster SCSI host adapter (ISA)
o Adaptec AHA-1460, AHA-1460B, AHA-1460C, AHA-1460D (PC Card)
o Adaptec AHA-1030B, AHA-1030P (PC98)
o NEC PC-9801-100 (PC98)
SEE ALSO aha(4), ahb(4), ahc(4), cd(4), ch(4), da(4), intro(4), sa(4)BUGS
The driver does not work well with multiple devices on the SCSI bus. The driver works well with devices like CDROMs and Tape drives. The
driver works not so well with disk drives. The PC Card version appears to work better than the ISA version, but that may be due to differing
levels of testing of the devices.
BSD November 8, 2003 BSD