07-17-2013
Unable to match string within awk printf
Hi RudhiThanks a lot for your solution...I was thinking in same lines but could not know how to do exaclty. I built my logic on this. Hi MadeInGermanyThanks you too.Guys very sorry for replying very late...ThanksKrsna
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi all, I need to category the processes in my system with awk. And for now, there are several command with similar name, so i have to match more than one pattern to pick it out. for instance:
binrundb
the string1, 2 & 3 may contain word, number, blank or "/". The "bin" should be ahead "rundb"... (5 Replies)
Discussion started by: sleepy_11
5 Replies
2. Shell Programming and Scripting
Hi all,
My simple AWK code does C = A - B
If C can be a negative number, how awk printf formating handles it using string format specifier.
Thanks in advance
Kanu
:confused: (9 Replies)
Discussion started by: kanu_pathak
9 Replies
3. Shell Programming and Scripting
Hi,
I'm trying to match records using awk which contain only one occurance of my string, I know how to match one or more (+) but matching only one is eluding me without developing some convoluted bit of code. I was hoping there would be some simple pattern matching thing similar to '+' but... (9 Replies)
Discussion started by: jonathanm
9 Replies
4. Shell Programming and Scripting
hi all
can any one help me to understand this
bdf -t vfxs | awk '/\//{printf("%-30s%-10s%-10s%-10s%-5s%-10s\n",$1,$2,$3,$4,$5,$6)}'
i want to understand the numbers %-30S% (4 Replies)
Discussion started by: maxim42
4 Replies
5. Shell Programming and Scripting
Hi Friends,
I am trying to insert lines of the below format in a file:
# x3a4914 Joe 2010/04/07
# seh Lane 2010/04/07
# IN01379 Larry 2010/04/07
I am formatting the strings as follows using awk printf:
awk 'printf "# %s %9s %18s\n", $2,$3,$4}'
... (2 Replies)
Discussion started by: sugan
2 Replies
6. Shell Programming and Scripting
Hi,
Im an awk noob and I am having trouble trying to get matches.
Here is my script:
#!/bin/gawk -f
BEGIN {}
$0 ~ /<a href=".*">.*<\/a>/{print}
Ideally I want to be able to get the actual link and print it. In PHP you can do preg_replace and get the match you want by using \\1 where 1... (2 Replies)
Discussion started by: adsyuk
2 Replies
7. Shell Programming and Scripting
Hi all,
I have a list that I would like to parse with awk/sed. The list is contains entries such as:
JournalTitle: Biochemistry
JournalTitle: Biochemistry and cell biology = Biochimie et biologie cellulaire
JournalTitle: Biochemistry and experimental biology
JournalTitle: Biochemistry and... (6 Replies)
Discussion started by: euval
6 Replies
8. UNIX for Dummies Questions & Answers
Hi !
With awk, I would need to trim a string from the beginning up to the first occurrence of "1", then from the beginning up to the second occurrence of "1", then from the beginning up to the third, then the fourth...., then the last occurrence of "1".
input:
1aaa1bb1ccccccc
dd1e1ffff... (7 Replies)
Discussion started by: beca123456
7 Replies
9. Shell Programming and Scripting
Hi all,
Here is the data file:
- want to match only lan3 in the output .
- not lan3:1
file :
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""... (2 Replies)
Discussion started by: rveri
2 Replies
10. Shell Programming and Scripting
I have a large file with interface records. I need to check every record that has the string "encapsulation bridge1483" and if the next line after this does not have "ip description" then I need to insert a line to add "ip description blah_blah_blah.
Sample file:
interface atm 1/0.190158... (3 Replies)
Discussion started by: numele
3 Replies
LEARN ABOUT NETBSD
dpkg-checkbuilddeps
dpkg-checkbuilddeps(1) dpkg suite dpkg-checkbuilddeps(1)
NAME
dpkg-checkbuilddeps - check build dependencies and conflicts
SYNOPSIS
dpkg-checkbuilddeps [option...] [control-file]
DESCRIPTION
This program checks the installed packages in the system against the build dependencies and build conflicts listed in the control file. If
any are not met, it displays them and exits with a nonzero return code.
By default, debian/control is read, but an alternate control filename may be specified on the command line.
OPTIONS
--admindir=dir
Change the location of the dpkg database (since dpkg 1.14.0). The default location is /var/lib/dpkg.
-A Ignore Build-Depends-Arch and Build-Conflicts-Arch lines (since dpkg 1.16.4). Use when only arch-indep packages will be built, or
combine with -B when only a source package is to be built.
-B Ignore Build-Depends-Indep and Build-Conflicts-Indep lines. Use when only arch-dep packages will be built, or combine with -A when
only a source package is to be built.
-I Ignore built-in build depends and conflicts (since dpkg 1.18.2). These are implicit dependencies that are usually required on a
specific distribution, the so called Build-Essential package set.
-d build-depends-string
-c build-conflicts-string
Use the given build dependencies/conflicts instead of those contained in the debian/control file (since dpkg 1.14.17).
-a arch
Check build dependencies/conflicts assuming that the package described in the control file is to be built for the given host
architecture instead of the architecture of the current system (since dpkg 1.16.2).
-P profile[,...]
Check build dependencies/conflicts assuming that the package described in the control file is to be built for the given build
profile(s) (since dpkg 1.17.2). The argument is a comma-separated list of profile names.
-?, --help
Show the usage message and exit.
--version
Show the version and exit.
ENVIRONMENT
DEB_BUILD_PROFILES
If set, it will be used as the active build profile(s) for the package being built. It is a space separated list of profile names.
Overridden by the -P option.
1.19.0.5 2018-04-16 dpkg-checkbuilddeps(1)