Sponsored Content
Top Forums Shell Programming and Scripting Ambiguous output redirect in xterm Post 302903939 by Exitalterego on Saturday 31st of May 2014 01:25:51 AM
Old 05-31-2014
Thanks for that. The first suggestion didn't work (I think the single quotes prevented the variables from being treated as such).

However the second suggestions works fine. One thing I didn't realise though is that it doesn't write out the output to the log as its created but appears to buffer it somewhere before logging all output in one go. This isn't a problem though! Just an observation Smilie

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Redirect Xterm

I am using a program that opens up an Xterm window, where the simulation running sends a lot of messages to. I would like to keep these messages, but I guess the buffer size is not large enough to show all of them, they get truncated. So my questions are: 1. How can I redirect the messages... (1 Reply)
Discussion started by: barisgultekin
1 Replies

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

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

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

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

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

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

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

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

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
OB_GET_CLEAN(3) 							 1							   OB_GET_CLEAN(3)

ob_get_clean - Get current buffer contents and delete current output buffer

SYNOPSIS
string ob_get_clean (void ) DESCRIPTION
Gets the current buffer contents and delete current output buffer. ob_get_clean(3) essentially executes both ob_get_contents(3) and ob_end_clean(3). The output buffer must be started by ob_start(3) with PHP_OUTPUT_HANDLER_CLEANABLE flag. Otherwise ob_get_clean(3) will not work. RETURN VALUES
Returns the contents of the output buffer and end output buffering. If output buffering isn't active then FALSE is returned. EXAMPLES
Example #1 A simple ob_get_clean(3) example <?php ob_start(); echo "Hello World"; $out = ob_get_clean(); $out = strtolower($out); var_dump($out); ?> The above example will output: string(11) "hello world" SEE ALSO
ob_get_contents(3), ob_start(3). PHP Documentation Group OB_GET_CLEAN(3)
All times are GMT -4. The time now is 12:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy