Sponsored Content
Full Discussion: Unix script
Top Forums Shell Programming and Scripting Unix script Post 302230891 by Annihilannic on Monday 1st of September 2008 02:00:40 AM
Old 09-01-2008
I think the requirement is a little more complicated than that anyway. If you did want to use find like that you would have to protect the * using '*in'. Also the uniq is pointless since filenames are unique by definition.

How can you tell what date each file is for? Is it included in the filename, or are you going by the last modification date of each file?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP script for sending a file from one unix directory to another unix server director

Hi, My local server is :/usr/abcd/ Remote server is :/Usr/host/test/ I want to send files from local unix directory(All files starting with O_999) to remote host unix directory. Can any body give me the Unix Shell script to do this. One more doubt: Shall we need to change the file... (1 Reply)
Discussion started by: raja_1234
1 Replies

2. Shell Programming and Scripting

ftp from windows to unix using a perl script on unix machine

i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
Discussion started by: raksha.s
3 Replies

3. Shell Programming and Scripting

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

Hi, I need help urgently for following issue. Pls help me to resolve this issue. I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql) I given... (6 Replies)
Discussion started by: praka
6 Replies

4. UNIX for Advanced & Expert Users

Executing a shell script from windows;script present in unix

I need to execute a shell script kept in unix machine from windows. User id, password area available. For eg. There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS. Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies

5. Shell Programming and Scripting

Need to write a script to reformat a file in unix but not familiar with unix

unix script must do the fiollowing open a file containing comma delimited records > each record contains 10 fields > removes the 2nd field and use that same field containing fields 2 to 10 the original record after fprocessing should containing fields 1 and 3 a new erecord must be... (10 Replies)
Discussion started by: dwightja
10 Replies

6. Shell Programming and Scripting

UNIX script to FTP file from UNIX server to windows

Hi, I am new to this subject.....Can someone please help me out with the script... unix usernm "sdhftst" unix pwd "chsd13" windows usernm "dfghtst" windows pwd "chsd13" path..../xxx/xxxxx/xxxxxx/xxxxxxx please can u get me a script...its only one file to get ftp. Thanks... (2 Replies)
Discussion started by: himakiran9
2 Replies

7. Shell Programming and Scripting

FTP from windows to unix server using unix shell script

Hi, Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting? If so what command i need to use. thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies

8. Shell Programming and Scripting

How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX?

Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies

9. Shell Programming and Scripting

How to pass Oracle sql script as argument to UNIX shell script?

Hi all, $ echo $SHELL /bin/bash Requirement - How to pass oracle sql script as argument to unix shell script? $ ./output.sh users.sql Below are the shell scripts and the oracle sql file in the same folder. Shell Script $ cat output.sh #!/bin/bash .... (7 Replies)
Discussion started by: a1_win
7 Replies

10. Shell Programming and Scripting

Downloading hdfs file to local UNIX through UNIX script

Hi All , I am very new to unix script.I am aware of unix commands but never put together in unix script level.If any one can suggest me technical guidance in the below scenario that will highly beneficial. Data have been already migrated from mainframe to Hadoop file system(HDFS).HDFS server... (15 Replies)
Discussion started by: STCET22
15 Replies
vbind(1)							    ShapeTools								  vbind(1)

NAME
vbind - bind name to version SYNOPSIS
vbind [ options ] filenames .. General version binding options: [ -bind version binding ] [ -before baseline ] [ -since baseline ] [ -last ] [ -lastsaved ] [ -uniq ] [ -nonuniq ] [ -rule rule- body | rulename ] [ -rulefile filename ] [ -trace ] vbind command specific options: [ -? (or -help) ] [ -alias version alias ] [ -date date ] [ -vnum version number ] [ -nomsg ] [ -ruledump ] [ -ruleerr ] [ -rulelist ] [ -ruletest ] [ -version ] OVERVIEW
This manual page describes the ShapeTools Version Binding mechanism, available in most commands of the toolkit. The general version binding options described on this page are available in many commands such like vl(1), vcat(1), vadm(1), save(1) and retrv(1) (just to name the most important ones). The vbind command specific options are private to the vbind command (see below). Version binding is the process of selecting one or more versions from a filenames history in order to provides access to these version(s). This is conducted by version bind directives (or just version bindings), which may be one of the following: version numbers "1.2" (version), "1." (generation), ".2" (revision) version alias names "ShapeTools-1.4", or "AtFS-2.0" Version alias names are symbolic names tagged to single versions. They must be unique throughout a history. date specifications "10.2.93" or "4.3." (European), "Feb 10, 1993" or "Mar 4{ (American) A date may additionally contain a time in the form hh:mm or hh:mm:ss. See sttime(3) for a complete list of recognized date formats. bind rule names "most_recent:" (plain), "from_release(VC-4.0):" (with argument) The colon is not part of the rule name. See the bindrules(7) manual page for a description on how to define version bind rules. By default, version binding selects all versions fulfilling the given version bind requirements. The -uniq option changes this behavior and treats only unique identification as success. With this option given, version bind ignores all histories with more than one selected ver- sion. The -last and -lastsaved options unify a non unique selection by choosing the last version (modification/saving time) or the last saved version (saving time) from the bind hit set of each name. The file $SHAPETOOLS/lib/shape/BindRules contains predefined rules for various cases. You may also define your own rule file and invoke this by either the -rulefile option or by extending the search space defined by the SHAPETOOLS environment variable. For information on how to write version bind rules, see the bindrules(7) manual page. VERSION BINDING IN ACTION
Version bind directives can be given either in brackets, directly following the name to be bound, or as option arguments. Options may be user to set version bindings to be applied to all name arguments (-bind and -rule options) or to define version ranges (-since and -before options). Version identification by version number or version alias either results in a unique selection or fails, when no appropriate version was found. foo[1.2] Identifies a specific version by it's version number. foo[release-2] Is interpreted as identification by version alias name. Version identification by date selects the versions from a history that have been the most recently saved versions at the given date. Iden- tification by date may lead to multiple versions when development work in multiple generations happened simultaneously at the given date. Vbind understands various date formats such as in the list below. The sttime(3) manual page lists all recognized date formats. foo[Jan 31, 1992] foo[92/01/31] foo[10.5.92 7:00:00] Version bind rules describe general version binding policies. They are usually not dependent on particular file histories and may be applied to all histories. Version bind rules may have arguments enclosed in parentheses following the name. foo[bind_rule:] foo[bind_rule(arg1,arg2,...argN):] When the colon at the end of the rule name in brackets is omitted, vbind first interprets the given string as version alias. When no ver- sion with this alias name was found, vbind treats the string as rule name and gives it a second try. Plain filenames are those not followed by any version bind directive in square brackets. Without a rule given with the -rule option on the command line, plain filenames are bound using the default version bind rule. It selects the busy version if there is one, or the most recent non busy version otherwise. eq (state, busy); max (version). The default version binding may also be indicated by an empty pair of brackets: foo[] NAME PATTERNS
The ShapeTools version binding mechanism performs filename substitution for given name patterns similar to sh(1). This is necessary, as shell filename substitution does not recognize the names of saved versions. Magic cookies are are: * matching any string, including the empty string, ? matching any single character, [c...] matching any one of the characters enclosed in the square brackets, [l-r] matching any character lexically between the left (l) and the right (r) character, inclusive, and [!c...] [!l-r] matching any character not recognized by their counterparts above. As square brackets on the command line may either be part of a pattern (e.g. *.[ch]) or a version binding (e.g. *[release-2]), this may lead to some confusion. The leftmost pair of brackets is always interpreted as version binding. Hence, in the first case, the string will be misinterpreted and you must add an explicit version binding to avoid this (e.g. *.[ch][], default version binding added). GENERAL VERSION BINDING OPTIONS
-before baseline Define the lower boundary of a time interval for selecting all versions evolved in this interval. Baseline can be any version bind directive uniquely selecting a version (e.g. version number, version alias, or date). The saving date of the baseline version is the interval start time. The boundary version (exactly matching the time given) is not included in the result set. -bind version binding Use version binding for binding each name on the command line, that has no explicit version binding in brackets. -last Select the last (modification/saving time) version of each nonunique selection. This causes the resulting version list to contain at most one version of each history. -last may be combined with other version bindings. -lastsaved Like -last, but busy versions are ignored. -nonuniq Force non-unique version identification. This option can be used to swich off the default behavior of some commands (e.g. vadm) that suggests unique version identification. -rule rulename | rulebody With a name argument, this option sets the named rule as default rule for binding all names on the command line. Alternatively, a rule body (a version selection rule without a name) may be given as argument, which will be evaluated for each name on the command line. This option disables any previous -bind or -rule definition. It does not affect names with a version binding in brackets. -rulefile filename Read in the named rule file and add all contained rules to the list of known rules. A syntactical error, detected while parsing a rule causes the according rule to be skipped. Use vbind(1) with the -ruleerr option for inspecting bind rule files. Multiple rule files may be specified on the command line. -since baseline Define the upper boundary of a time interval for selecting all versions evolved in this interval. Baseline can be any version bind directive uniquely selecting a version (e.g. version number, version alias, or date. The saving date of the baseline version is the interval end time. The boundary version (exactly matching the time given) is not included in the result set. -trace Trace the evaluation. Each evaluated predicate is reported to standard output. Additionally, the set of versions fulfilling the expressed (the hits set) is displayed after evaluation of each predicate. -uniq Require unique version identification. All history names on the command line, where multiple versions meet the version bind require- ments are ignored. THE VBIND COMMAND
Vbind performs a version binding and returns a bound filename for each selected version. A bound filename is a filename followed by a ver- sion number enclosed in brackets (e.g. foo[1.2]). -?, -help Display a short usage description. -alias version alias Use version alias for binding all names on the command line. This disables any previous -alias, -bind, -date, -rule or -vnum defi- nition. It does not affect names in pseudo bound version notation. -date date Use date for binding all names occurring on the command line. This disables any previous -alias, -bind, date, -rule or -vnum defi- nition. It does not affect names in pseudo bound version notation. -nomsgSuppress output produced by version bind rules. -ruledump The -ruledump option causes all known version bind rules to be written to standard output. The generated output contains all rule definitions in regular format and may be used as input rulefile for subsequent calls of vbind. -ruleerr This option makes sense, when testing a new, hand written file containing bind rules. The -ruleerr option causes syntax errors detected in the rule file to be reported to standard error. Make sure, that this option occurs on the command line prior to the rulefile to be inspected. -rulelist Write a list of all known rule names to standard output. -ruletest Interpret all names on the command line as rule names and test the existence of equally named rules in the list of known rules. -version Print version identification of vbind command and used libraries. -vnum version number Use version number for binding all names on the command line. This disables any previous -alias, -bind, -date, -rule or -vnum defi- nition. It does not affect names in pseudo bound version notation. ENVIRONMENT
SHAPETOOLS - list of path names as search space for files containing version bind rules. The bind rule files must be named BindRules. Default path is /usr/local/lib/shape. FILES
$SHAPETOOLS/lib/shape/BindRules SEE ALSO
vl(1), sttime(3), bindrules(7) AUTHOR
Andreas.Lampen@cs.tu-berlin.de AtFStk-1.12 Thu Mar 10 12:15:43 1994 vbind(1)
All times are GMT -4. The time now is 11:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy