Sponsored Content
Top Forums Shell Programming and Scripting [solved] Awk/shell question to parse hour minute from text Post 302892334 by satishrao on Wednesday 12th of March 2014 11:01:02 AM
Old 03-12-2014
Thanks!! Really have to be better at working with sed and awk.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to: Parse text string into variables using Korn shell

I am writing a script to keep check on free disk space, and I would like to find a way to parse $LINE (see code below) into a numeric value (for free disk space percentage) and a string value (for mount point). If possible, I would like to avoid sed or any additional use of awk since I am not very... (7 Replies)
Discussion started by: shew01
7 Replies

2. Shell Programming and Scripting

Crontab for every minute or every hour

How to set crontab for every minute or every hour (1 Reply)
Discussion started by: kaushik02018
1 Replies

3. Shell Programming and Scripting

Parse text file in shell & store to variable

Hi, I need to parse a simple text file like below and store the word that starts with BR* to a variable say $BRno. I need to do this in sh script. NOTE: the length of the numbers following BR is in constant. And there is only 1 BRXXX in a file at a given time. .txt file: BR276828... (1 Reply)
Discussion started by: script2010
1 Replies

4. Shell Programming and Scripting

sed or awk to parse this text

I am just beginning with sed and awk and understand that they are "per" line input. That is, they operate on each line individually, and output based on rules, etc. But I have multi-line text blocks that looks as follows, and wish to ONLY extract the text between the first hyphen (-) and the... (13 Replies)
Discussion started by: bulgin
13 Replies

5. Shell Programming and Scripting

counting word xx referred to a time period, like minute or hour

Hello, I try to insert a post because I've got a trouble to perform a unix job. But I didn't found which steps (procedure) I should follow. Could you help me? I got a log by my Application box, like following: gbosmam037:test >view Log_Server.csv ... (2 Replies)
Discussion started by: maluca68
2 Replies

6. UNIX for Dummies Questions & Answers

How to add an hour or a minute to a time?

Hi, The timestamp is June 06 2011 11:05AM i need 2 results. first, an hour added to it, June 06 2011 12:05AM second, a minute added to it, June 06 2011 11:06AM How can i do this? Also when it reaches 12:59, it needs to start from 1 again without giving the output as 13:00. it... (17 Replies)
Discussion started by: irudayaraj
17 Replies

7. Emergency UNIX and Linux Support

[Solved] AWK to parse adjacent matching lines

Hi, I have an input file like F : 0.1 : 0.002 P : 0.3 : 0.004 P : 0.5 : 0.008 P : 0.1 : 0.005 L : 0.05 : 0.02 P: 0.1 : 0.006 P : 0.01 : 0.08 F : 0.02 : 0.08 Expected output: (2 Replies)
Discussion started by: vasanth.vadalur
2 Replies

8. Shell Programming and Scripting

Take minute per minute from a log awk

Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand. this is my log: xxxx 16/04/2012 17:00:52 - xxxx714 - E234 - Time= 119 ms.... (8 Replies)
Discussion started by: jockx
8 Replies

9. Emergency UNIX and Linux Support

[Solved] EMERGENCY - can I revert 1 hour of mysql changes

I know, its stupid.. MYSQL on CENTOS 5 using WHM Imported a lot of users/posts from old forum to new forum, but my backup was lost. Can I somehow simply remove all mysql table changes for the last 3 hours, returning to pre-import status. ---------- Post updated at 03:44 AM ----------... (6 Replies)
Discussion started by: lawstudent
6 Replies

10. Shell Programming and Scripting

awk to parse file and display result based on text

I am trying using awk to open an input file and check a column 2/field $2 and if there is a warning then that is displayed (variantchecker): G not found at position 459, found A instead. The attached Sample1.txt is that file. If in that column/field there is a black space, then the text after... (6 Replies)
Discussion started by: cmccabe
6 Replies
spintime(1)							  [incr Widgets]						       spintime(1)

__________________________________________________________________________________________________________________________________________________

NAME
spintime - Create and manipulate time spinner widgets SYNOPSIS
spintime pathName ?options? INHERITANCE
itk::Widget <- Spintime STANDARD OPTIONS
background cursor foreground relief See the "options" manual entry for details on the standard options. ASSOCIATED OPTIONS
textBackground textFont See the "entryfield" manual entry for details on the above associated options. labelFont labelMargin See the "labeledwidget" manual entry for details on the above associated options. arrowOrient repeatDelay repeatInterval See the "spinner" manual entry for details on the above associated options. WIDGET-SPECIFIC OPTIONS Name: labelPos Class: Position Command-Line Switch: -labelpos Specifies the position of the label along the sides of the various spinners: n, e, s, or w. The default is w. Name: hourLabel Class: Text Command-Line Switch: -hourlabel Specifies the text of the label for the hour spinner. The default is "Hour". Name: hourOn Class: hourOn Command-Line Switch: -houron Specifies whether or not to display the hour spinner in any of the forms acceptable to Tcl_GetBoolean. The default is true. Name: hourWidth Class: Width Command-Line Switch: -hourwidth Specifies the width of the hour spinner in any of the forms acceptable to Tcl_GetPixels. The default is 3 pixels. Name: militaryOn Class: militaryOn Command-Line Switch: -militaryon Specifies use of a 24 hour clock for hour display in any of the forms acceptable to Tcl_GetBoolean. The default is true. Name: minuteLabel Class: Text Command-Line Switch: -minutelabel Specifies the text of the label for the minute spinner. The default is "Minute". Name: minuteOn Class: minuteOn Command-Line Switch: -minuteon Specifies whether or not to display the minute spinner in any of the forms acceptable to Tcl_GetBoolean. The default is true. Name: minuteWidth Class: Width Command-Line Switch: -minutewidth Specifies the width of the minute spinner in any of the forms acceptable to Tcl_GetPixels. The default is 3 pixels. Name: orient Class: Orient Command-Line Switch: -orient Specifies the orientation of the hour, minute, and second spinners: vertical or horizontal. The default is horizontal. Name: secondLabel Class: Text Command-Line Switch: -secondlabel Specifies the text of the label for the second spinner. The default is "Second" Name: secondOn Class: secondOn Command-Line Switch: -secondon Specifies whether or not to display the second spinner in any of the forms acceptable to Tcl_GetBoolean. The default is true. Name: secondWidth Class: Width Command-Line Switch: -secondwidth Specifies the width of the second spinner in any of the forms acceptable to Tcl_GetPixels. The default is 3 pixels. Name: timeMargin Class: Margin Command-Line Switch: -timemargin Specifies the margin space between the hour, minute, and second spinners is any of the forms accpetable to Tcl_GetPixels. The default is 1 pixel. __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The spintime command creates a set of spinners for use in time value entry. The set includes an hour, minute, and second spinner widget. METHODS
The spintime command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The fol- lowing commands are possible for spintime widgets: WIDGET-SPECIFIC METHODS pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the spintime command. pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the spintime command. pathName get ?format? Returns the current contents of the spintime widget in a format of string or as an integer clock value using the -string and -clicks format options respectively. The default is by string. Reference the clock command for more information on obtaining time and its formats. pathName show time Changes the currently displayed time to be that of the time argument. The time may be specified either as a string, an integer clock value or the keyword "now". Reference the clock command for more information on obtaining times and its format. COMPONENTS
Name: hour Class: Spinint The hour component is the hour spinner of the time spinner. See the SpinInt widget manual entry for details on the hour component item. Name: minute Class: Spinint The minute component is the minute spinner of the time spinner. See the SpinInt widget manual entry for details on the minute com- ponent item. Name: second Class: Spinint The second component is the second spinner of the time spinner. See the SpinInt widget manual entry for details on the second com- ponent item. EXAMPLE
spintime .st pack .st -padx 10 -pady 10 AUTHOR
Sue Yockey Mark L. Ulferts KEYWORDS
spintime, spinint, spinner, entryfield, entry, widget Tk spintime(1)
All times are GMT -4. The time now is 12:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy