10-15-2004
Read up on
opendir()/readdir()/closedir()/fnmatch()
or
glob()
ftw() (with fnmatch()) may be of interest as well if you do not care about portability with BSD systems - everyone but they supports it.
And I'll close this thread now because you abused the ``report post'' button - It is there to notify moderators of messages that violate the forum rules in one way or another, not to get someone to help you quicker.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear friends:
I have these data files:
fileaa
fileab
fileac
filead
I want to email these file to someone. How can I email EACH SINGLE FILE with a wild card character?
mail john@mail.com<fileaa
mail john@mail.com<fileab
...............................ac... (4 Replies)
Discussion started by: bobo
4 Replies
2. Solaris
I have a Sunfire V890 running solaris 10 that has a weird console problem. In the XWindows environment, everything seems to work fine. However, if I go to command-line mode in multi-user mode or otherwise, my prompt scrolls accross the screen so incontrollably, that the only thing you can do is... (5 Replies)
Discussion started by: josephgreensr
5 Replies
3. Shell Programming and Scripting
Hi All,
I'm new to shell scripting. Please help me in achieving this
I am trying to a find regular expression that need to pick a file with begin with the below format and this code is called in xml file.
currently the script accepts:... (0 Replies)
Discussion started by: vasavi_cherku
0 Replies
4. UNIX for Dummies Questions & Answers
if ; then => is it correct?
i need to check 10 files size and do the same action. The file name is same but extension of the files are different. how do i deal with it? Please help (1 Reply)
Discussion started by: nidhink
1 Replies
5. Shell Programming and Scripting
I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies
6. Shell Programming and Scripting
HI All,
I have a script that needs to find out a list of files in a directory, i pass the search parameter as an argument.
opendir ( DIR, $dir ) || die "Error in opening dir $dirname\n";
@filename1 = (grep {/$File_pattern/ } readdir(DIR));
The problem is my file patterns are like... (1 Reply)
Discussion started by: amit1_x
1 Replies
7. UNIX for Dummies Questions & Answers
Im trying to use wild cards to find files that start with either an upper or lower case letter e.g. list files that beginning with b or B, i also want to sort them by the time they were last modified. e.g latest file created first.
At the moment i have the following code that
ls -d... (3 Replies)
Discussion started by: parker4001
3 Replies
8. Shell Programming and Scripting
Hi
I need a unix command which generates the list of files that dont match the wild card pattern in the current directory
say for example
I have files like
x.addfd.txt.H2012.txt
x.addfd.txt.H2012.txt
x.asegfd.txt.H2012.txt
adfd.bagddf
I need the list of files which dont match... (4 Replies)
Discussion started by: lijjumathew
4 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
My server is AIX and i am trying to search for a file in a specific path in directory.
The file name can be of two types:
Position_20131114.csv
Position123333_20131114.csv
I am trying to assign a SOURCEFILE variable as mentioned below:, but i am unable to find/locate the files... (2 Replies)
Discussion started by: abhi_123
2 Replies
10. UNIX for Advanced & Expert Users
I want to use Find command to find directories that have certain name and them find files in that directory having only some extensions. So far, I have come up with this command to list directories with wild card name and list ALL the files in that directory.
find . -type d -name prog\* -print... (11 Replies)
Discussion started by: sssccc
11 Replies
LEARN ABOUT ULTRIX
macstream
MACSTREAM(1) General Commands Manual MACSTREAM(1)
NAME
macstream - Convert a series of files to a MacBinary stream
SYNOPSIS
macstream [ - options ] files
DESCRIPTION
macstream takes the files specified in files and combines them to a MacBinary stream on standard output subject to the options specified.
If files also specifies directories they are followed recursively, and all files found will be put in the MacBinary stream, together with
directory information.
OPTIONS
In the absence of any options, macstream takes the specified files and silently combines them to a MacBinary stream, writing the result to
standard output. Directories named in files are followed recursively, all files found will be put in the MacBinary stream, together with
directory information. Files are assumed to be in MacBinary format. However, if the filename ends with .info the file is assumed to be
the info fork of a MacIntosh file split amongst more than one file. In that case the files with .data and .rsrc extension are also read
(if present). Also, if the info fork is mentioned in the parameter list, the names of data and resource forks can also be mentioned, but
those will be ignored (this is to allow wild-card expansion by the shell.) Further, if some form of AppleShare is supported by the
installed program, and if the current directory, or one of the directories found during recursive processing, is a directory in the format
of the supported version of AppleShare, those files will be handled according to the properties of AppleShare.
-r No intelligent file-processing is performed; all files named are assumed to be plain resource files, and are written as MacIntosh
resource files with creator "RSED" and type "RSRC", unless another creator and/or type are specified.
-d No intelligent file-processing is performed; all files named are assumed to be plain data files, and are written as MacIntosh data
files with creator "MACA" and type "TEXT", unless another creator and/or type are specified.
-u As -d, but the codes for CR and LF are interchanged.
-U Is a synonym for -u.
-c creator
Defines the creator name to be used if one of the previous options is specified.
-t type
Defines the type name to be used if one of the previous options is specified.
-l List every file and directory processed.
-i Do not output files, give information only (implies -l.)
-q Ask the user for every file/directory whether it should be visited (implies -l.)
-V Gives the patchlevel of the program, and other information. Other options are ignored and the program quits immediately.
-H Give short information about the options. Other options are ignored and the program quits immediately.
BUGS
As this is a beta release, there may still be some problems.
SEE ALSO
macutil(1)
AUTHOR
Dik T. Winter, CWI, Amsterdam, The Netherlands (dik@cwi.nl)
3rd Berkeley Distribution October 22, 1992 MACSTREAM(1)