Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Solved] Wildcards used in find, ls and grep commands Post 302730621 by RudiC on Tuesday 13th of November 2012 10:11:08 AM
Old 11-13-2012
Quote:
Originally Posted by jim mcnamara
. . .
* expands into all file names in the current directory
. . .
May I humbly add onto Jim's explanations: above is true except for filenames starting with "." (a period, so called hidden files)

Last edited by RudiC; 11-13-2012 at 11:23 AM..
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep and wildcards

Hi guys, a small problem today, I'm grepping a log file containing lines like this below: Mar 09 16:04:00 blabla Mar 09 16:04:02 blabla Mar 09 16:04:05 blabla Mar 09 16:04:15 blabla Mar 09 16:05:06 blabla Mar 09 16:05:23 blabla Mar 09 16:05:25 blabla ... in this file I'm grepping... (5 Replies)
Discussion started by: Lomic
5 Replies

2. UNIX for Dummies Questions & Answers

find and grep commands

I'm having trouble with the following commands i. count the number of lines which end in a 4 letter word grep '{4\}$' bfile <<seems to print out everything abc abc abcd joe joe john bob bill gregory greg greg gregory the grep command prints out the lines with 4 letter words and the... (3 Replies)
Discussion started by: StrengthThaDon
3 Replies

3. UNIX for Dummies Questions & Answers

help with find & grep commands

Folks; First about find: when i run this: find . -name '*log*' -mtime +10 -print | sed 's+^\./++;s+/.*++' | sort -u i got list of log files but also get a directories (although directory names doesn't have "log" in it). How can i exclude the directory from the output of this find command? ... (2 Replies)
Discussion started by: moe2266
2 Replies

4. Shell Programming and Scripting

Perl - grep issue in filenames with wildcards

Hi I have 2 directories t1 and t2 with some files in it. I have to see whether the files present in t1 is also there in t2 or not. Currently, both the directories contain the same files as shown below: $ABC.TXT def.txt Now, when I run the below script, it tells def.txt is found,... (5 Replies)
Discussion started by: guruprasadpr
5 Replies

5. Homework & Coursework Questions

find grep sed commands homework

Use and complete the template provided. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have to make as home work several commands with gerp find and sed 2. Relevant commands, code, scripts, algorithms: FIND command -use command find... (8 Replies)
Discussion started by: ViruS89
8 Replies

6. Homework & Coursework Questions

Need help using find or locate with wildcards

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: List all files in ~c12100 directory beginning with "BOZO" that end with either "123" or "456" 2. Relevant... (3 Replies)
Discussion started by: ScarletRavin
3 Replies

7. Shell Programming and Scripting

Grep wildcards

Hi all I want to search for number in file presented with wildcard as shown below. cat file.txt 1405 1623 1415 ....... ....... How to search for the number 141526 for example? If the number exist print "Number 141526 exist" if no, print "The number not exist" Thank you in advance. (3 Replies)
Discussion started by: vasil
3 Replies

8. Shell Programming and Scripting

[Solved] Grep within find command

Platform: AIX 6.1/ksh Question1. I want to grep for the string "CUSTOM_PKMS" in all the files in server except those files with extensions .dbf , .ctl and .dmp I started running the following command but it is taking too long because there are lots of .dbf , .ctl and .dmp files in this... (6 Replies)
Discussion started by: John K
6 Replies

9. Shell Programming and Scripting

Grep multiple patterns that contain wildcards

job_count=`grep -e "The job called .* has finished | The job called .* is running" logfile.txt | wc -l` Any idea how to count those 2 patterns so i have a total count of the finished and running jobs from the log file? If i do either of the patterns its works okay but adding them together... (8 Replies)
Discussion started by: finn
8 Replies

10. UNIX for Dummies Questions & Answers

Find command and use of wildcards

greetings, below is the find command i am using for some filesystem maintenance: find /data/Engine \( -type d -name .snapshot -prune -o -type d -wholename "/data/Engine/*/CAE" \ -prune -o -type d -wholename "/data/Engine/*/CAD" -prune -o -name ".*.case" \)\ -mtime +365 -print0 -fls... (5 Replies)
Discussion started by: crimso
5 Replies
TIX(3)							       Tix Built-In Commands							    TIX(3)

NAME
tixExFileSelectBox - Create and manipulate tixExFileSelectBox widgets SYNOPSIS
tixExFileSelectBox pathName ?options? SUPER-CLASS The TixExFileSelectBox class does not have a super-class. STANDARD OPTIONS
TixExFileSelectBox supports all the standard options of a frame widget. See the options(n) manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS [-browsecmd browseCmd] Specifies a command to call whenever the user browses on a filename in the file listbox (usually by single-clicking on the filename). The command is called with one argument, the complete pathname of the file. [-command command] Specifies the command to be called when the user chooses on a filename the file listbox (usually by double-clicking on the filename). The command is called with one argument, the complete pathname of the file. [-dialog dialog] Specifies a dialog box which contains this ExFileSelectBox widget. The dia- log box must be a widget of the class TixShell or its descendant classes. This is an internal option and should not be used by application programmers. [-dircmd dircmd] Specifies the TCL command to be called when a file listing is needed for a particular directory. If this option is not specified, by default the ExFileSelectBox widget will attempt to read the directory as a Unix directory. On special occa- sions, the application programmer may want to supply a special method for reading directories: for example, when he needs to list remote files. In this case, the -dircmd option can be used. The specified command accepts three arguments: the first is the name of the directory to be listed; the second is a list of file patterns, the third is a Boolean value indicating whether hidden files should be listed. This command returns a list of names of the files of this directory which match with the file patterns. Name: directory Class: Directory Switch: -directory Alias: -dir Specifies the current directory whose files and sub-directories are displayed in the ExFileSelectBox. [-disablecallback disable- Callback] A boolean value indicating whether callbacks should be disabled. When set to true, the TCL command specified by the -com- mand option is not executed when the -value of the ExFileSelectBox widget changes. [-filetypes fileTypes] Specifies the file types that can be selected from the "List Files of Type:" ComboBox subwidget. The value of this option must be a TCL list; each item of this list must in turn be a list of two elements. The first element is a list of file patterns. The second element is a string that describe these file patterns. For example: tixExFileSelectBox .box -filetypes { {{*} {All files}} {{*.txt} {Text files}} {{*.c *.h} {C source files}} } [-showhidden showHidden] Specifies whether hidden directories should be shown. By default, a directory name starting with a period "." is considered as a hidden directory. [-pattern pattern] Specifies whether the file pattern(s) to match with the files in the current directory. One or more file patterns can be given at the same time. For example, {*.c *.h} will match all files that have either the ".h" or ".c" extensions. Name: value Class: Value Switch: -value Alias: -selection Specifies the name of the filename currently selected by the user. SUBWIDGETS
Name: cancel Class: Button The button widget with the "Cancel" label. Name: dir Class: TixComboBox The ComboBox subwidget under the "Directories" heading. Name: dirlist Class: TixDirList The DirList subwidget that shows the hierarchical list of directories. Name: file Class: TixComboBox The ComboBox subwidget under the "Files" heading. Name: filelist Class: TixScrolledListBox The ScrolledListBox subwidget that shows the list of filenames. Name: hidden Class: Checkbutton The checkbutton widget with the "Show Hidden Files" label. Name: ok Class: Button The button widget with the "OK" label. Name: types Class: TixComboBox The ComboBox subwidget under the "List Files of Type" heading. DESCRIPTION
The tixExFileSelectBox command creates a new window (given by the pathName argument) and makes it into a ExFileSelectBox widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the ExFileSelectBox such as its cursor and relief. The ExFileSelectBox widget is usually embedded in a tixExFileSelectDialog widget. It provides an convenient method for the user to select files. The style of the ExFileSelectBox widget is very similar to the standard file dialog in MS Windows 3.1. WIDGET COMMANDS
The tixExFileSelectBox command creates a new Tcl command whose name is the same as the path name of the ExFileSelectBox's window. This com- mand may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? PathName is the name of the command, which is the same as the ExFileSelectBox widget's path name. Option and the args determine the exact behavior of the command. The following commands are possible for ExFileSelectBox widgets: pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixExFileS- electBox 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 tixExFileSelectBox command. pathName filter Forces the ExFileSelectBox widget to re-filter all the filenames according to the -pattern option. pathName invoke Forces the ExFileSelectBox widget to perform actions as if the user has pressed the "OK" button. pathName subwidget name ?args? When no options are given, this command returns the pathname of the subwidget of the specified name. When options are given, the widget command of the specified subwidget will be called with these options. KEYWORDS
Tix(n) Tix 4.0 TIX(3)
All times are GMT -4. The time now is 10:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy