Sponsored Content
Top Forums Shell Programming and Scripting Receiving 'ambiguous redirect' when trying to run command against multiple files Post 302538283 by HLee1981 on Tuesday 12th of July 2011 11:53:30 AM
Old 07-12-2011
I misinterpreted the brackets as parentheses (although the command worked despite not using the brackets) - oops! Thanks so much for the explanation!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ambiguous redirect

i have following statement in the script echo -e "$str_XML_col_name:$str_field_type;" >> $i_DC_Key_$i_Tgt_DC_key_Schema here $i_DC_Key is DC key and $i_Tgt_DC_key are the variables............... when i ran the script i am getting error rec_merge.sh: $i_DC_Key_$i_Tgt_DC_key_Schema:... (1 Reply)
Discussion started by: mahabunta
1 Replies

2. Shell Programming and Scripting

Ambiguous output redirect error

Hi everyone, While I was trying to do DATE=`date +"%Y%m%d_%H%M%S"` STARTLOG=$TUXSTDDIR/start_$DATE.log tmboot -y > $STARTLOG 2>&1 I got an error i.e. Ambiguous output redirect error. Here the first part is to boot the account so there is nothing wrong with that.... (6 Replies)
Discussion started by: pareshan
6 Replies

3. Shell Programming and Scripting

> to empty files, but ambiguous redirect

Hi Everyone, # ll total 0 -rw-r--r-- 1 root root 0 2010-05-13 11:29 a1.log -rw-r--r-- 1 root root 0 2010-05-13 11:29 a2.log -rw-r--r-- 1 root root 0 2010-05-13 11:29 a3.log # rm a.log above rm no problem, but when i use "> a.log", it says "-bash: a.log: ambiguous redirect". ... (3 Replies)
Discussion started by: jimmy_y
3 Replies

4. UNIX for Dummies Questions & Answers

ambiguous redirect issue

I am trying to run the following script and I am getting an "ambiguous redirect" error. I have checked to make sure that the files are all where I have specified and are read/write as needed. Any ideas? Note: I have removed the actual path info for privacy sake. I have triple checked to make... (1 Reply)
Discussion started by: malantha
1 Replies

5. Shell Programming and Scripting

Ambiguous redirect

Hello there, I'm totally new in bash programming and ran into my first problem. My script should generate 3 textfiles where the content of the first and the third row are the same in each file. Only the second row is different. This is what I did in a very simplified explanation: ... (6 Replies)
Discussion started by: johndoe
6 Replies

6. Shell Programming and Scripting

ambiguous redirect error

This script has ambiguous redirect error. ... cd $HOME cd folder/work # search all subfolders in work directory find -mindepth 1 -maxdepth 1 -type d | while read directory do CUR_FOLDER="${directory#"./"}" cd $CUR_FOLDER chmod 644 * for ff in *; do if ; then ... (5 Replies)
Discussion started by: candyme
5 Replies

7. Linux

Ambiguous redirect error and syntax error when using on multiple files

Hi, I need help on following linux bash script. When I linux commands for loop or while loop on individual file it runs great. but now I want the script to run on N number of files so it gives me ambiguous redirect error on line 12 and syntax error on line 22 : (pls help ); #!/bin/bash #... (16 Replies)
Discussion started by: Madhusudan Das
16 Replies

8. Shell Programming and Scripting

Ambiguous output redirect in xterm

Hi all, I've been working on a bash script to help with backups that I have to do at work. One of the lines in the script is supposed to launch an xterm, log into a specific server node and launch a tar backup to tape. This part works ok, but I've been trying to get stdout and stderr to... (2 Replies)
Discussion started by: Exitalterego
2 Replies

9. Shell Programming and Scripting

How to use a loop for multiple files in a folder to run awk command?

Dear folks I have two data set which there names are "final.map" and "1.geno" and look like this structures: final.map: gi|358485511|ref|NC_006088.3| 2044 gi|358485511|ref|NC_006088.3| 2048 gi|358485511|ref|NC_006088.3| 2187 gi|358485511|ref|NC_006088.3| 17654 ... (2 Replies)
Discussion started by: sajmar
2 Replies

10. Shell Programming and Scripting

$1”: ambiguous redirect

New to the site, please let me know I'm not meeting the post guidelines. I'm creating a bash script to generate a report with output from a grep command. The goal is to direct the output to a different log file by using a 'logger file'. But I get this error during the run: $1: ambiguous... (5 Replies)
Discussion started by: dallas88
5 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 02:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy