Sponsored Content
Full Discussion: ls grep query
Special Forums UNIX Desktop Questions & Answers ls grep query Post 302430903 by tmn0004676 on Saturday 19th of June 2010 01:07:37 PM
Old 06-19-2010
thanks for that....I'm going to have a think about it down the pub!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

query on grep command

Hai Friends Can anyone provide me a grep command to print x to y lines in a file. For example: grep command to display 15th line to 21st Thanks in advance Collins (4 Replies)
Discussion started by: collins
4 Replies

2. Shell Programming and Scripting

Query regarding grep

In what cases the following command ignores lines in input file: $ grep -c "^" inputfile (1 Reply)
Discussion started by: amicon007
1 Replies

3. Shell Programming and Scripting

grep command query

Hi I have file like this: Sun Jan 24 03:00:00 2010: *** Weekly Process - get_ens_files.pl START *** Sun Jan 24 03:00:00 2010: *** *** Sun Jan 24 03:00:00 2010: *************************************************** Sun Jan 24 03:00:11 2010: ... (2 Replies)
Discussion started by: koti_rama
2 Replies

4. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

5. Shell Programming and Scripting

Grep query

As part of my never-ending nagios automation project I am need to implement the following run line into a loop; -bash-3.00$ grep ${feed} /usr/local/feed/service/clients/*/bin/* | awk -F/ '{print "To restart: /"$2"/"$3"/"$4"/"$5"/"$6"/"$7"/"$8"/"$9}' Which prints to screen; To restart:... (3 Replies)
Discussion started by: JayC89
3 Replies

6. Shell Programming and Scripting

grep/sed query

Hi all, I have one query,in my script,i give one input like sectionname that enclose with and that will search in specific file in specific directory.If found ,then it's search next section and begin of section ,sometext means different sectionname. p1 p2 p3 p4 p5 p6 I want to... (2 Replies)
Discussion started by: suryanarayan
2 Replies

7. UNIX for Dummies Questions & Answers

query related to grep

Hi All, The result for 'grep "cert_codes" /develop/sales/appl.srce/*.4gl' command will be saved at aa.txt grep "cert_codes" /develop/sales/appl.srce/*.4gl >aa.txt But I am not sure, whether, all result stored in .txt file in case of multi-line result. Please revert back if... (2 Replies)
Discussion started by: pbankar
2 Replies

8. Shell Programming and Scripting

grep command query

list ALL file entries with a last modification date of September 20. using grep (1 Reply)
Discussion started by: polineni
1 Replies

9. Shell Programming and Scripting

Grep query

Hi, What does this line do grep -E 'ORA-' $LIN_TOP/log/status.log > /dev/null 2>&1 Does this check in status.log and in std out, stderr also.? Thanks (3 Replies)
Discussion started by: nag_sathi
3 Replies

10. UNIX for Dummies Questions & Answers

File grep quick query

Hi Experts, I need some suggestion on file grep. I am trying to find multiple pattern with the file grep as below grep "2013" trace.log | grep -f pattern.cfg -i > $LOG if ; then mail -s "Exception" "sample@abc.com" < $LOG fi Is it possible to obtain what pattern I got in the... (5 Replies)
Discussion started by: senthil.ak
5 Replies
ggAddObserver(3)							GGI							  ggAddObserver(3)

NAME
ggAddObserver, ggDelObserver, ggNotifyObservers, ggClearPublisher - Simple observer framework SYNOPSIS
#include <ggi/gg.h> typedef int (ggfunc_observer_update)(void *arg, int flag, void *data); struct gg_observer { ggfunc_observer_update *update; void *arg; GG_LIST_ENTRY(gg_observer) _others; }; struct gg_publisher { GG_LIST_HEAD(gg_observer_list, gg_observer) observers; }; #define INIT_PUBLISHER(pub) GG_LIST_INIT(&((pub)->observers)) struct gg_observer * ggAddObserver(struct gg_publisher *, ggfunc_observer_update *, void *); void ggDelObserver(struct gg_observer *); void ggNotifyObservers(struct gg_publisher *, int, void *); void ggClearPublisher(struct gg_publisher *); DESCRIPTION
The observer pattern is very useful and commonly found in many software packages, even if not explicitly called that way. The problem is that every different software will often use a particular implementation of this pattern, depending on a specific use-case. So usually everybody prefers to roll its own. LibGG observers are defined as part of the forth-coming api infrastructure, as light-weight cooperation model between libraries. The model is very simple: struct gg_publisher defines a channel on which observers can be registered. An observer is simply an opaque value and a callback receiving that value as first argument, a flag, and an opaque channel-specific message. The idea is that if you known the observable you're listen- ing on, you know the semantics behind the flag and message. When the observable is triggered, all observers' callbacks will be fired. ggAddObserver registers a new observer on a publisher. ggDelObserver unregisters the given observer from its publisher and frees it. ggNotifyObservers triggers all observers update functions for that publisher. The flag and message will be given to the observers' update callbacks. An observer *must not* call ggDelObserver on itself in the update function to unregister. Instead it must return a non-zero value. ggClearPublisher frees all observers registered on the publisher. If at least one is left, then there is probably a logical error in the observer code, since it must already have been notified some- how of the publisher going down, and unregistered all callbacks before. RETURN VALUES
ggAddObserver returns a newly constructed observer hook. Normally, the caller will keep a reference to it to call if he needs to call ggDe- lObserver later. EXAMPLE
#include <ggi/gg.h> #include <stdio.h> int update(void* o, int f, void *d) { printf("update called for observer %p, flag=%i, data=%p ", o, f ,d); if (o == 1) { return 1; /* unregister */ } return 0; } int main() { struct gg_publisher pub; struct gg_observer *o1, *o2; INIT_PUBLISHER(&pub); o1 = ggAddObserver(&pub, update, (void*)1); o2 = ggAddObserver(&pub, update, (void*)2); ggNotifyObservers(&pub, 0, NULL); ggNotifyObservers(&pub, 1, NULL); ggClearPublisher(&pub); return 0; } libgg-1.0.x 2005-08-26 ggAddObserver(3)
All times are GMT -4. The time now is 07:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy