Sponsored Content
Full Discussion: ambiguous redirect error
Top Forums Shell Programming and Scripting ambiguous redirect error Post 302515497 by candyme on Wednesday 20th of April 2011 08:25:10 AM
Old 04-20-2011
No, this didn't help Smilie\

It's strange that error appears with NEW_XML_NAME variable...
 

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

Receiving 'ambiguous redirect' when trying to run command against multiple files

I came across the command string on https://www.unix.com/shell-programming-scripting/141885-awk-removing-data-before-after-pattern.html which was what I was looking for to be able to remove data before a certain pattern. However, outputting the result to a file seems to work on an individual basis... (4 Replies)
Discussion started by: HLee1981
4 Replies

7. Shell Programming and Scripting

Ambiguous error

Hello everybody, I just took over this job from someone else and in the past this script they built worked but i recently upgraded from openSuSe 11.4 to 12.1 Now when i run the script i get an ambiguous error at line 25 (the first line after add() ) I have edited out the webpath and any... (1 Reply)
Discussion started by: gumbicus
1 Replies

8. 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

9. 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

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
explain_open(3) 					     Library Functions Manual						   explain_open(3)

NAME
explain_open - explain open(2) errors SYNOPSIS
#include <libexplain/open.h> const char *explain_open(const char *pathname, int flags, int mode); const char *explain_errno_open(int errnum, const char *pathname, int flags, int mode); void explain_message_open(char *message, int message_size, const char *pathname, int flags, int mode); void explain_message_errno_open(char *message, int message_size, int errnum, const char *pathname, int flags, int mode); DESCRIPTION
These functions may be used to obtains explanations for open(2) errors. explain_open(const char *pathname, int flags, int mode); const char *explain_open(const char *pathname, int flags, int mode); The explain_open function is used to obtain an explanation of an error returned by the open(2) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: int fd = open(pathname, flags, mode); if (fd < 0) { fprintf(stderr, '%s0, explain_open(pathname, flags, mode)); exit(EXIT_FAILURE); } pathname The original pathname, exactly as passed to the open(2) system call. flags The original flags, exactly as passed to the open(2) system call. mode The original mode, exactly as passed to the open(2) system call (or zero if the original call didn't need a mode argument). Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_errno_open const char *explain_errno_open(int errnum, const char *pathname, int flags, int mode); The explain_errno_open function is used to obtain an explanation of an error returned by the open(2) system call. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: int fd = open(pathname, flags, mode); if (fd < 0) { int err = errno; fprintf(stderr, '%s0, explain_errno_open(err, pathname, flags, mode)); exit(EXIT_FAILURE); } errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the open(2) system call. flags The original flags, exactly as passed to the open(2) system call. mode The original mode, exactly as passed to the open(2) system call (or zero if the original call didn't need a mode argument). Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_message_open void explain_message_open(char *message, int message_size, const char *pathname, int flags, int mode); The explain_message_open function is used to obtain an explanation of an error returned by the open(2) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: int fd = open(pathname, flags, mode); if (fd < 0) { char message[3000]; explain_message_open(message, sizeof(message), pathname, flags, mode); fprintf(stderr, '%s0, message); exit(EXIT_FAILURE); } message The location in which to store the returned message. Because a message return buffer has been supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. pathname The original pathname, exactly as passed to the open(2) system call. flags The original flags, exactly as passed to the open(2) system call. mode The original mode, exactly as passed to the open(2) system call (or zero if the original call didn't need a mode argument). explain_message_errno_open void explain_message_errno_open(char *message, int message_size, int errnum, const char *pathname, int flags, int mode); The explain_message_errno_open function is used to obtain an explanation of an error returned by the open(2) system call. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following exameple: int fd = open(pathname, flags, mode); if (fd < 0) { int err = errno; char message[3000]; explain_message_errno_open(message, sizeof(message), err, pathname, flags, mode); fprintf(stderr, '%s0, message); exit(EXIT_FAILURE); } message The location in which to store the returned message. Because a message return buffer has been supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the open(2) system call. flags The original flags, exactly as passed to the open(2) system call. mode The original mode, exactly as passed to the open(2) system call (or zero if the original call didn't need a mode argument). COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller AUTHOR
Written by Peter Miller <pmiller@opensource.org.au> explain_open(3)
All times are GMT -4. The time now is 09:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy