Sponsored Content
Top Forums Shell Programming and Scripting Creating a file from input stream Post 302871219 by bartus11 on Tuesday 5th of November 2013 04:50:17 PM
Old 11-05-2013
Try:
Code:
myfunc()
{
  tr " " "\n" > /tmp/1
}

 

10 More Discussions You Might Find Interesting

1. Programming

File I/O Stream

Hi All, I am trying to read data from two files and then compare them and only print the records on the screen that have a same ID.i.e TAGNO =CUSTOMERNO For Eg My Input Files are (a) Transaction (b) Customer detail The data in file a is like: TagNo Date Time Station... (0 Replies)
Discussion started by: rooh
0 Replies

2. Shell Programming and Scripting

creating unique lists from user input

hi all, I'm trying to resolve a scenario where we prompt the user to enter 1 or more disk names. From there we would run a command on each disk which would give its location. This would allow us to create a list of disks at location A, a list of disks at location B,....etc... Any help... (1 Reply)
Discussion started by: annie
1 Replies

3. Shell Programming and Scripting

creating files and getting input from another file

I have a file where i have files name with absolute path. Ex: files.dat and contents are: /root/xy/yz/zz/abc.txt /root/xx/yy/zz/ac.txt /root/xz/yz/zx/bc.txt /root/xy/yz/zx/abcd.txt now i want to create all above files(dummy files and can be 0 byte). i thought of using touch but it doesn't... (10 Replies)
Discussion started by: ajayyadavmca
10 Replies

4. UNIX for Dummies Questions & Answers

Get the last value in the input stream

Hello Everyone, The situation is: $ alias rm="sh abc.sh" #abc.sh: read input echo "The input was: " $input $ rm xyz.txt should return "The input was: xyz.txt" Here, I want the alias "rm" to execute the file "abc.sh", where "abc.sh" should take "xyz.txt"... (1 Reply)
Discussion started by: qasim
1 Replies

5. Shell Programming and Scripting

[Video stream] network stream recording with mplayer

Hi I used this command: mplayer http://host/axis-cgi/mjpg/video.cgi -user root -passwd root \ -cache 1024 -fps 25.0 -nosound -vc ffh264 \ -demuxer 3 -dumpstream -dumpfile output.avi It's ok but... Video Playing is very fast! Why? Is it a synch problem? What parameter I have to use for... (1 Reply)
Discussion started by: takeo.kikuta
1 Replies

6. Shell Programming and Scripting

Creating Dynamic Input or daa files

Hi, I got a requirement to automate the process. We have SLA files, there are some 80 SLA files comes from 1.30pm - 5.30pm. I was asked to write a script to check for the SLA files in the load directory, if the files come then we got to send the mail to the group, if the mails doesnt come... (1 Reply)
Discussion started by: afahmed
1 Replies

7. Shell Programming and Scripting

[KSH] Creating automatic variable from read input

Hello there, I am posting to seek help with a KSH script, I am making a simple calculation program where the user can enter as many numbers as they like, I am getting their input using the read command, however I am not sure how to repeat doing this and storing the input in to new variables... (7 Replies)
Discussion started by: pandapowerbox
7 Replies

8. Shell Programming and Scripting

Creating a script requiring a pause for user input

Hi I'm trying to create a basic script that pauses for user input to verify a file name before generating the output. I have numerous SSL certificate files which I am trying to determine the expiry date so what I'm trying to do is write a script so that is pauses to request the name of the .pem... (9 Replies)
Discussion started by: Buddyluv
9 Replies

9. UNIX for Dummies Questions & Answers

Creating a new directory by getting input from user

Hi All, I am really new to Linux.I am trying to write a script for creating a new directory by getting input of folder name from the user.Please help me in this regard. #! /bin/bash echo "Enter name of dir":$filename mkdir -p $filename When executing this I am getting following error ... (13 Replies)
Discussion started by: Pradeep_1990
13 Replies

10. Programming

creating separate output file for each input file in python

Experts, Need your help for this. Please support My motive is to create seperate output file for each Input Files(File 1 and File2) in another folder say(/tmp/finaloutput) Input files File 1(1.1.1.1.csv) a,b,c 43,17104773,3 45,17104234,4 File 2(2.2.2.2.csv) a,b,c 43,17104773,1... (2 Replies)
Discussion started by: as7951
2 Replies
FFLUSH(3)						   BSD Library Functions Manual 						 FFLUSH(3)

NAME
fflush, fpurge -- flush a stream LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stdio.h> int fflush(FILE *stream); int fpurge(FILE *stream); DESCRIPTION
The function fflush() forces a write of all buffered data for the given output or update stream via the stream's underlying write function. The open status of the stream is unaffected. If the stream argument is NULL, fflush() flushes all open output streams. The function fpurge() erases any input or output buffered in the given stream. For output streams this discards any unwritten output. For input streams this discards any input read from the underlying object but not yet obtained via getc(3); this includes any text pushed back via ungetc(3). RETURN VALUES
Upon successful completion 0 is returned. Otherwise, EOF is returned and the global variable errno is set to indicate the error. ERRORS
[EBADF] stream is not an open stream, or, in the case of fflush(), not a stream open for writing. The function fflush() may also fail and set errno for any of the errors specified for the routine write(2). SEE ALSO
write(2), fclose(3), fopen(3), setbuf(3) STANDARDS
The fflush() function conforms to ANSI X3.159-1989 (``ANSI C89''). BSD
June 4, 1993 BSD
All times are GMT -4. The time now is 08:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy