Sponsored Content
Full Discussion: Empty buffer when is full
Top Forums Shell Programming and Scripting Empty buffer when is full Post 302413580 by bobbasystem on Friday 16th of April 2010 09:32:13 AM
Old 04-16-2010
Quote:
Originally Posted by Corona688
What do you mean by buffer?

If by buffer you mean file, you could:

Code:
( telnet 10.99.246.14 6001 | split -a 4 -d -l 5000 - output. )

This will produce output.0000, output.0001, etc. split apart every 5000 lines. You can delete the old files and it will continue making new ones.

---------- Post updated at 02:24 PM ---------- Previous update was at 02:15 PM ----------

Actually, it can be far simpler. 'echo > output.txt' will clear it out.
I was referring to the console buffer...but with your help my problem is resolved.
Many thanks!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Why is my buffer empty in vi?

this question is probably trivial to most of you but i do not have the answer. the task is simple... yank 7 lines of text from one file and paste them to another so while in command mode i enter "b7yy and i get 7 lines yanked exit vi with :q! open the new file while in command mode i... (2 Replies)
Discussion started by: cookiebooy
2 Replies

2. UNIX for Dummies Questions & Answers

how to find empty folders without using -empty

hi all: my solaris FIND does not support find myFolder -type d -empty how can i find the empty folders? thanks! (7 Replies)
Discussion started by: lasse
7 Replies

3. UNIX for Dummies Questions & Answers

Getting same exit status for empty and non empty file

Hi All, I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both. The value of $? is coming 0 in if part also and else part too. #!/bin/ksh if ]; then echo "data" # exit 0 echo "$?" else... (4 Replies)
Discussion started by: mavesum
4 Replies

4. Shell Programming and Scripting

expect_out(buffer) empty

I have only some info into my buffer, but after a rssi command I see the folowing lines expected into buffer but not present : rssi=-106 rssi=-109 I see in my buffer only the first part of the output, here you are a part of script : #!/usr/bin/expect -f #global expect_out match_max 10000000... (1 Reply)
Discussion started by: ugobale
1 Replies

5. Shell Programming and Scripting

How to extract strings from full path when full path is not fixed

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

6. Shell Programming and Scripting

EXPECT help with full buffer(?), or other available solutions

First, to level set: I'm proficient enough with basic BASH scripting for simple things (say, 4 out of 10), but this current project really requires a higher understanding of EXPECT than I have. I have an interactive-only control application residing locally on a database server that I would... (2 Replies)
Discussion started by: toeharp
2 Replies

7. Shell Programming and Scripting

Check if Queue empty or full in perl

Hi, I got problem with queue code how to determined empty and full and problem with while loop Here is my pseudo code : Input page Access Input Pgae Frame For i =3 to pageframe count by 1 construct queue of size i set pageFaultCount to 0 while morepages do page = NextPage... (1 Reply)
Discussion started by: guidely
1 Replies

8. Programming

buffer in C

Hello, size_t write(int fd, const void *buf, size_t count) { static size_t (*write_func)(int, const void *, size_t) = NULL; if (!write_func) write_func = (size_t(*)(int, const void *, size_t)) dlsym(RTLD_NEXT, "write"); char tmp; memcpy(tmp,buf,count); ... (3 Replies)
Discussion started by: chercheur857
3 Replies

9. AIX

100% Inode full with only 67% FS full.

AIX Version 6.1 and 7.1. I understand that when the OS initially creates the FS and inodes, its pretty strict, but not always tuned to a 1:1 ratio. I see the same thing when adding a whole disk LV to a separate device. It seems that when we expand a filesystem the inodes don't get tuned... (5 Replies)
Discussion started by: mrmurdock
5 Replies
OB_GET_FLUSH(3) 							 1							   OB_GET_FLUSH(3)

ob_get_flush - Flush the output buffer, return it as a string and turn off output buffering

SYNOPSIS
string ob_get_flush (void ) DESCRIPTION
ob_get_flush(3) flushes the output buffer, return it as a string and turns off output buffering. The output buffer must be started by ob_start(3) with PHP_OUTPUT_HANDLER_FLUSHABLE flag. Otherwise ob_get_flush(3) will not work. Note This function is similar to ob_end_flush(3), except that this function returns the buffer as a string. RETURN VALUES
Returns the output buffer or FALSE if no buffering is active. EXAMPLES
Example #1 ob_get_flush(3) example <?php //using output_buffering=On print_r(ob_list_handlers()); //save buffer in a file $buffer = ob_get_flush(); file_put_contents('buffer.txt', $buffer); print_r(ob_list_handlers()); ?> The above example will output: Array ( [0] => default output handler ) Array ( ) SEE ALSO
ob_end_clean(3), ob_end_flush(3), ob_list_handlers(3). PHP Documentation Group OB_GET_FLUSH(3)
All times are GMT -4. The time now is 03:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy