Sponsored Content
Full Discussion: grep sed and a loop
Top Forums UNIX for Dummies Questions & Answers grep sed and a loop Post 302521314 by gunnahafta on Tuesday 10th of May 2011 11:04:32 PM
Old 05-11-2011
while i appreciate your response agama im afraid im ust not that knowledgable enough to figure out how to achieve what your suggesting, most specifically how to read the last date\time, tuck it away, and then use that for the next run of the script. Would reallly appreicate if if you educate me a little Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep in a loop

Hi , I am trying a script which takes user input userid . I am stuck how to check whether that is a valid user id or not in the audit log files. My code is : cd $CCP_AUDIT cat * > /export/home/$USR/l***/files echo "UserId:\c" read UserId #Date Function echo "DATE : \c" read xxx I... (7 Replies)
Discussion started by: gundu
7 Replies

2. UNIX for Dummies Questions & Answers

grep -v while loop

alist contain: a b c d e blist contain: a b c the code: #!/usr/bin/ksh cat blist | while read line do grep -V "$line" alist > data done (8 Replies)
Discussion started by: bobo
8 Replies

3. Shell Programming and Scripting

How to get lines started with matched strings using sed or grep for loop?

I have a huge file and want to separate it into several subsets. The file looks like: C1 C2 C3 C4 ... (variable names) 1 .... 2 .... 3 .... : 22 .... 23 .... I want to separate the huge file using the column 1, which has numbers from 1 to 23 (but there are different amount of... (8 Replies)
Discussion started by: AMBER
8 Replies

4. Shell Programming and Scripting

grep within while read loop

I have a key file $ cat klist 5 N:8855 CASA VERDE ROAD :32827 :ORLAND 5 N:585 MOLLY LANE :30189 :WOODST 5 N:320 NINA ROAD :32304 :TALLAH and a data file, see example of the line below: N:RT 15 & N 7TH STREET :17837 :U SAVE I need to search by key (2nd field) from klist... (6 Replies)
Discussion started by: migurus
6 Replies

5. Shell Programming and Scripting

Using grep within a while loop

Hi all, I have the below script to get input but i cannot get grep to work. input1.txt AAAAAAAAG input2.txt >gi|184009.1| LEAFY-like |AAAAAAAAGSGGGDHLPY However, when i use grep -f input1.txt input2.txt i cannot get any output matches (note that the match is underlined). Is it... (8 Replies)
Discussion started by: turkishvan
8 Replies

6. Shell Programming and Scripting

Help on grep in a do while loop

So this is what I'm trying to do: I have a file called registry.txt which has a list of registry entries I want to search for. I have another file called inctrl.txt on which I want to perform the search on. Here's the example contents of registry.txt SOFTWARE\Microsoft\Security... (3 Replies)
Discussion started by: r4v3n
3 Replies

7. Red Hat

using grep in a while loop

Hello everybody, I have been searching it, but it seems I am unable to find the correct information, that s why I am asking you guys, hoping somebody get an idea. Here is my problem : I want a script to loop until a string is identified in a log file. Here is the script : #!/bin/sh... (5 Replies)
Discussion started by: guyiom
5 Replies

8. Homework & Coursework Questions

GREP loop

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I need to search through the users home directories for keywords, display them. The code listed below will show... (7 Replies)
Discussion started by: jcllns1
7 Replies

9. UNIX for Beginners Questions & Answers

Grep command in a loop

Hello - I am running a script that is outputting to a log. Let call it output.log I would like to monitor that log until the line "Build Successful" is found. I think I would need to use the grep command. How would I do that in a loop? Thanks Marty (1 Reply)
Discussion started by: MSpeare
1 Replies

10. Shell Programming and Scripting

Ps ax with grep in loop

Hello, I have built the following script to check if processes supplied by the argument are running or not. #!/bin/bash PROCLIST=$1 PROCESS="0" ERROR_PROCS="" IFS='+' read -ra ADDR <<< "$PROCLIST" for PROC in "${ADDR}"; do if ; then PROCESS=1 ... (9 Replies)
Discussion started by: nms
9 Replies
QDateTimeEdit(3qt)														QDateTimeEdit(3qt)

NAME
QDateTimeEdit - Combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes SYNOPSIS
#include <qdatetimeedit.h> Inherits QWidget. Public Members QDateTimeEdit ( QWidget * parent = 0, const char * name = 0 ) QDateTimeEdit ( const QDateTime & datetime, QWidget * parent = 0, const char * name = 0 ) ~QDateTimeEdit () QDateTime dateTime () const QDateEdit * dateEdit () QTimeEdit * timeEdit () virtual void setAutoAdvance ( bool advance ) bool autoAdvance () const Public Slots virtual void setDateTime ( const QDateTime & dt ) Signals void valueChanged ( const QDateTime & datetime ) Properties QDateTime dateTime - the editor's datetime value DESCRIPTION
The QDateTimeEdit class combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes. QDateTimeEdit consists of a QDateEdit and QTimeEdit widget placed side by side and offers the functionality of both. The user can edit the date and time by using the keyboard or the arrow keys to increase/decrease date or time values. The Tab key can be used to move from section to section within the QDateTimeEdit widget, and the user can be moved automatically when they complete a section using setAutoAdvance(). The datetime can be set with setDateTime(). The date format is read from the system's locale settings. It is set to year, month, day order if that is not possible. See QDateEdit::setOrder() to change this. Times appear in the order hours, minutes, seconds using the 24 hour clock. It is recommended that the QDateTimeEdit is initialised with a datetime, e.g. QDateTimeEdit *dateTimeEdit = new QDateTimeEdit( QDateTime::currentDateTime(), this ); dateTimeEdit->dateEdit()->setRange( QDateTime::currentDate(), QDateTime::currentDate().addDays( 7 ) ); Here we've created a new QDateTimeEdit set to the current date and time, and set the date to have a minimum date of now and a maximum date of a week from now. Terminology: A QDateEdit widget consists of three 'sections', one each for the year, month and day. Similarly a QTimeEdit consists of three sections, one each for the hour, minute and second. The character that separates each date section is specified with setDateSeparator(); similarly setTimeSeparator() is used for the time sections. <center> [Image Omitted] </center> See also QDateEdit, QTimeEdit, Advanced Widgets, and Time and Date. MEMBER FUNCTION DOCUMENTATION
QDateTimeEdit::QDateTimeEdit ( QWidget * parent = 0, const char * name = 0 ) Constructs an empty datetime edit with parent parent and called name. QDateTimeEdit::QDateTimeEdit ( const QDateTime & datetime, QWidget * parent = 0, const char * name = 0 ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Constructs a datetime edit with the initial value datetime, parent parent and called name. QDateTimeEdit::~QDateTimeEdit () Destroys the object and frees any allocated resources. bool QDateTimeEdit::autoAdvance () const Returns TRUE if auto-advance is enabled, otherwise returns FALSE. See also setAutoAdvance(). QDateEdit * QDateTimeEdit::dateEdit () Returns the internal widget used for editing the date part of the datetime. QDateTime QDateTimeEdit::dateTime () const Returns the editor's datetime value. See the "dateTime" property for details. void QDateTimeEdit::setAutoAdvance ( bool advance ) [virtual] Sets the auto advance property of the editor to advance. If set to TRUE, the editor will automatically advance focus to the next date or time section if the user has completed a section. void QDateTimeEdit::setDateTime ( const QDateTime & dt ) [virtual slot] Sets the editor's datetime value to dt. See the "dateTime" property for details. QTimeEdit * QDateTimeEdit::timeEdit () Returns the internal widget used for editing the time part of the datetime. void QDateTimeEdit::valueChanged ( const QDateTime & datetime ) [signal] This signal is emitted every time the date or time changes. The datetime argument is the new datetime. Property Documentation QDateTime dateTime This property holds the editor's datetime value. The datetime edit's datetime which may be an invalid datetime. Set this property's value with setDateTime() and get this property's value with dateTime(). SEE ALSO
http://doc.trolltech.com/qdatetimeedit.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qdatetimeedit.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QDateTimeEdit(3qt)
All times are GMT -4. The time now is 05:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy