06-14-2017
If you don't know the word in advance, you need to define some context by which the target is identifyable, like "it's in the line starting with "EX" in the second block", or "it's on the fifth data line". You can't use "it's the last field that is 8 chars long" as this will cause false triggers...
Last edited by RudiC; 06-15-2017 at 07:09 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi guys,
I want to do pattern matching with awk or sed but I don't know how. here's what I want:
I have a line number for a pattern that I have already found using grep, and I know a pattern like "---" that happens a few lines above that certain line number. I want to print out the chunk... (1 Reply)
Discussion started by: alirezan
1 Replies
2. Shell Programming and Scripting
Hi,
sorry for newbie question :confused:
can't find how to cut ?
from
1000 2000 word some text1....
100 200 300 word some text2....
10 20 30 abc word some text3....
to
some text1....
some text2....
some text3.... (7 Replies)
Discussion started by: Trump
7 Replies
3. Shell Programming and Scripting
Input:
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
Output:
root
daemon
bin
sys
adm
tty (8 Replies)
Discussion started by: cola
8 Replies
4. Shell Programming and Scripting
Hi Guys,
Please help me out in my situation of writing a shell script
Exampl:I have a output like
asnapply 1 2 3 apply_server=1 apply_schema=ASN
asnapply 1 2 3 apply_server=2 apply_schema=ASN
Now i need output like
asnacmd applysever=1 applyschema=ASN stop
asnacmd applysever=2... (16 Replies)
Discussion started by: mallak
16 Replies
5. Shell Programming and Scripting
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies
6. Shell Programming and Scripting
Hi,
I have a file which has the following
/usr/new/xyz/abc
/us1/neb/yxr/def
/usr/bin/cloud1/fgh
/net/bin1/txt1/kdq
I want to do something like this
/usr/new/xyz/abc xyz
/us1/neb/yxr/def yxr
/usr/bin/cloud1/fgh cloud1
/net/bin1/txt1/kdq txt1
I need to add the 2nd last word to the... (3 Replies)
Discussion started by: matbrow
3 Replies
7. Shell Programming and Scripting
I want to make the first character of some words to be uppercase. I have a file like the one below.
uid,givenname,sn,cn,mail,telephonenumber
mattj,matt,johnson,matt johnson,mattj@gmail.com
markv,mark,vennet,matt s vennet,markv@gmail.com
mikea,mike,austi,mike austin,mike@gmail.com
I want... (3 Replies)
Discussion started by: matt12
3 Replies
8. Shell Programming and Scripting
Hello, I need some help extracting the number after the RBA e.g 15911688 from the below block of text (e.g: grep RBA |sed .......). The code should be valid for blocks if text generated at different times as well and not for the below text only.
... (2 Replies)
Discussion started by: drbiloukos
2 Replies
9. Shell Programming and Scripting
I have http log that I want to get words after specific "tag", this a sample line from the log:
98,POST,200 OK,www.facebook.com,Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1,/ajax/updatestatus.php?__a=1,datr=P_H1TgjTczCHxiGwdIF5tvpC; lu=Si1fMkcrU2SInpY8tk_7tAnw;... (6 Replies)
Discussion started by: erlanq
6 Replies
10. Shell Programming and Scripting
awk/sed newbie here. I have a HTML file and from that file and I would like to retrieve a text word.
<font face=arial size=-1><li><a href=/value_for_clients/Tokyo/abc_process.txt>abc</a> NDK Version: 4.0 </li>
<font face=arial size=-1><li><a... (6 Replies)
Discussion started by: sk2code
6 Replies
LEARN ABOUT DEBIAN
deb-triggers
deb-triggers(5) dpkg utilities deb-triggers(5)
NAME
deb-triggers - package triggers
SYNOPSIS
triggers
DESCRIPTION
A package declares its relationship to some trigger(s) by including a triggers file in its control archive (i.e. DEBIAN/triggers during
package creation).
This file contains directives, one per line. Leading and trailing whitespace and everything after the first # on any line will be trimmed,
and empty lines will be ignored.
The trigger control directives currently supported are:
interest trigger-name
interest-noawait trigger-name
Specifies that the package is interested in the named trigger. All triggers in which a package is interested must be listed using this
directive in the triggers control file. The "noawait" variant does not put the triggering packages in triggers-awaited state. This
should be used when the functionality provided by the trigger is not crucial.
activate trigger-name
activate-noawait trigger-name
Arranges that changes to this package's state will activate the specified trigger. The trigger will be activated at the start of the
following operations: unpack, configure, remove (including for the benefit of a conflicting package), purge and deconfigure. The
"noawait" variant does not put the triggering packages in triggers-awaited state. This should be used when the functionality provided
by the trigger is not crucial.
If this package disappears during the unpacking of another package the trigger will be activated when the disappearance is noted
towards the end of the unpack. Trigger processing, and transition from triggers-awaited to installed, does not cause activations. In
the case of unpack, triggers mentioned in both the old and new versions of the package will be activated.
Unknown directives are an error which will prevent installation of the package.
The "-noawait" variants are only supported by dpkg 1.16.1 or newer, and will lead to errors if used with an older dpkg. It is thus recom-
mended to add a "Pre-Depends: dpkg (>= 1.16.1)" to any package that wish to use those directives.
SEE ALSO
dpkg-trigger(1), dpkg(1), /usr/share/doc/dpkg-dev/triggers.txt.gz.
Debian Project 2011-08-14 deb-triggers(5)