Sponsored Content
Full Discussion: awk command
Top Forums Shell Programming and Scripting awk command Post 302639999 by prabhu_kumar on Monday 14th of May 2012 01:26:13 AM
Old 05-14-2012
As you said here S* means 0 or more occurances of s
and what if I need to search 1 or more occurances of S ?
thanks a lot
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

assign a command line argument and a unix command to awk variables

Hi , I have a piece of code ...wherein I need to assign the following ... 1) A command line argument to a variable e.g origCount=ARGV 2) A unix command to a variable e.g result=`wc -l testFile.txt` in my awk shell script When I do this : print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies

2. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

3. UNIX for Dummies Questions & Answers

Basic awk question...getting awk to act on $1 of the command itself

I have a script problem that I am not able to solve due my very limited understanding of unix/awk. This is the contents of test.sh awk '{print $1}' From the prompt if I enter: ./test.sh Hello World I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies

4. Shell Programming and Scripting

awk command for simple join command but based on 2 columns

input1 a_a a/a 10 100 a1 a_a 20 200 b1 b_b 30 300 input2 a_a a/a xxx yyy a1 a1 lll ppp b1 b_b kkk ooo output a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies

5. Shell Programming and Scripting

awk command in script gives error while same awk command at prompt runs fine: Why?

Hello all, Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val: > cat getnon0file.sh #!/bin/bash this="getnon0file.sh" USAGE=$this" InFile="xyz.38" Min="0.05" # awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies

6. Shell Programming and Scripting

awk command to compare a file with set of files in a directory using 'awk'

Hi, I have a situation to compare one file, say file1.txt with a set of files in directory.The directory contains more than 100 files. To be more precise, the requirement is to compare the first field of file1.txt with the first field in all the files in the directory.The files in the... (10 Replies)
Discussion started by: anandek
10 Replies

7. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

8. Shell Programming and Scripting

Pass awk field to a command line executed within awk

Hi, I am trying to pass awk field to a command line executed within awk (need to convert a timestamp into formatted date). All my attempts failed this far. Here's an example. It works fine with timestamp hard-codded into the command echo "1381653229 something" |awk 'BEGIN{cmd="date -d... (4 Replies)
Discussion started by: tuxer
4 Replies
finddialog(1)							  [incr Widgets]						     finddialog(1)

__________________________________________________________________________________________________________________________________________________

NAME
finddialog - Create and manipulate a find dialog widget SYNOPSIS
finddialog pathName ?options? INHERITANCE
itk::Toplevel <- Shell <- Dialogshell <- Finddialog STANDARD OPTIONS
activeBackground activeForegroundbackgroundborderWidth cursor disabledForeground fontforeground highlightColor highlightThickness insertBackgroundinsertBorderWidth insertOffTime insertOnTime insertWidth selectBackground selectBorderWidth selectColor selectForeground See the "options" manual entry for details on the standard options. ASSOCIATED OPTIONS
selectColor See the "checkbutton" widget manual entry for details on the above associated options. selectColor See the "entryfield" widget manual entry for details on the above associated options. labelFont See the "labeledwidget" widget manual entry for details on the above associated options. INHERITED OPTIONS
buttonBoxPadX buttonBoxPadY buttonBoxPos padX padY separator thickness See the "dialogshell" widget manual entry for details on the above inherited options. height master modality width See the "shell" widget manual entry for details on the above inherited options. title See the "Toplevel" widget manual entry for details on the above inherited options. WIDGET-SPECIFIC OPTIONS Name: clearCommand Class: Command Command-Line Switch: -clearcommand Specifies a command to be invoked following a clear operation. The option is meant to be used as means of notification that the clear has taken place and allow other actions to take place such as disabling a find again menu. Name: matchCommand Class: Command Command-Line Switch: -matchcommand Specifies a command to be invoked following a find operation. The command is called with a match point as an argument which identi- fies where exactly where in the text or scrolledtext widget that the match is located. Should a match not be found the match point is {}. The option is meant to be used as a means of notification that the find operation has completed and allow other actions to take place such as disabling a find again menu option if the match point was {}. Name: patternBackground Class: Background Command-Line Switch: -patternbackground Specifies the background color of the text matching the search pattern. It may have any of the forms accepted by Tk_GetColor. The default is gray44. Name: patternForeground Class: Background Command-Line Switch: -patternforeground Specifies the foreground color of the text matching the search pattern. It may have any of the forms accepted by Tk_GetColor. The default is white. Name: searchBackground Class: Background Command-Line Switch: -searchbackground Specifies the background color of the line containing the matching the search pattern. It may have any of the forms accepted by Tk_GetColor. The default is gray77. Name: searchForeground Class: Background Command-Line Switch: -searchforeground Specifies the foreground color of the line containing the matching the search pattern. It may have any of the forms accepted by Tk_GetColor. The default is black. Name: textWidget Class: TextWidget Command-Line Switch: -textwidget Specifies the text or scrolledtext widget to be searched. __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The finddialog command creates a find dialog that works in conjunction with a text or scrolledtext widget to provide a means of performing search operations. The user is prompted for a text pattern to be found in the text or scrolledtext widget. The search can be for all occurances, by regular expression, considerate of the case, or backwards. METHODS
The finddialog command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the wid- get. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for finddialog widgets: INHERITED METHODS
add buttonconfigure defaulthide invoke show See the "buttonbox" widget manual entry for details on the above inherited methods. activate center deactivate See the "shell" widget manual entry for details on the above inherited methods. 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 finddialog command. pathName clear Clears the pattern in the entry field and the pattern matchin indicators in the text or scrolledtext widget. 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 finddialog command. pathName find Search for a specific text string in the text widget given by the -textwidget option. This method is the standard callback for the Find button. It is made available such that it can be bound to a find again action. COMPONENTS
Name: all Class: Checkbutton The all component specifies that all the matches of the pattern should be found when performing the search. See the "checkbutton" widget manual entry for details on the all component item. Name: backwards Class: Checkbutton The backwards component specifies that the search should continue in a backwards direction towards the beginning of the text or scrolledtext widget. See the "checkbutton" widget manual entry for details on the backwards component item. Name: case Class: Checkbutton The case component specifies that the case of the pattern should be taken into consideration when performing the search. See the "checkbutton" widget manual entry for details on the case component item. Name: pattern Class: Entryfield The pattern component provides the pattern entry field. See the "entryfield" widget manual entry for details on the pattern compo- nent item. Name: regexp Class: Checkbutton The regexp component specifies that the pattern is a regular expression. See the "checkbutton" widget manual entry for details on the regexp component item. EXAMPLE
scrolledtext .st pack .st .st insert end "Now is the time for all good men " .st insert end "to come to the aid of their country" finddialog .fd -textwidget .st .fd center .st .fd activate AUTHOR
Mark L. Ulferts KEYWORDS
finddialog, dialogshell, shell, widget Tk finddialog(1)
All times are GMT -4. The time now is 05:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy