Sponsored Content
Top Forums Shell Programming and Scripting Issue with output redirection Post 302672127 by pmonika on Monday 16th of July 2012 02:57:55 AM
Old 07-16-2012
Issue with output redirection

Hi,

I am using AIX server. I have a korn shell script where in I am redirecting a line to a file in a while loop:


Code:
while read line
do
     outputline=$line;
     echo $outputline >> "./temp/exec_list_"$ETL_JOB_RUN"_temp"
done < ./temp/exec_list_$ETL_JOB_RUN

Sometimes, when the CPU usage goes upto 99%, the command "echo $outputline >> "./temp/exec_list_"$ETL_JOB_RUN"_temp"" does not work and skips to the next step. I think, the writer process is slower than the reader process or we'll have to increase the pipe size.

Any suggestions how this can be achieved?


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data.

Last edited by zaxxon; 07-16-2012 at 10:30 AM.. Reason: code tags, see PM
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Standard output and redirection

Hello, Is is possible to redirect stdout to a file as well as to the console/screen or display in ksh. any thoughts suggestions/input is appreciated. Thanks. (2 Replies)
Discussion started by: jerardfjay
2 Replies

2. Shell Programming and Scripting

redirection output in two files

I want to redirect output of my script to two logfiles. I tried this : ./run.sh -c APP | tee >(grep " " > AppLogs.log) >(grep "XYZ" > xyz.log) >dev/null but this does not solve my purpose because logfile xyz.log remains empty untill i stop my script, i want both files, AppLogs.log and... (4 Replies)
Discussion started by: cmdup
4 Replies

3. Shell Programming and Scripting

redirection and output

I'm redirecting the output of a command to a logfile, however, if the user is on a terminal I would also like the output to be displayed on the screen. tar tvf some_tarfile >Logfile if the user is on a term then have the output to the Logfile and also be displayed on the screen at the same... (2 Replies)
Discussion started by: nck
2 Replies

4. Shell Programming and Scripting

Redirection output

Hi there I have a script that runs but it outputs everything onto the screen instead of a file. I've tried using the > outputfile.txt however all it does is dump the output to the screen and creates an outputfile.txt but doesn't put anything in that file. Any help would be appreciated ... (6 Replies)
Discussion started by: kma07
6 Replies

5. Shell Programming and Scripting

Output redirection

We have an application here that does some table queries and then prints the result on screen. I do not have the code of this application (which i will just call "queryCommand"), but what it does is that you call it with some parameters and it prints some info about the query and then the... (5 Replies)
Discussion started by: jolateh
5 Replies

6. UNIX for Dummies Questions & Answers

Output redirection

Hello i am trying to write a script that will redirect the output to a certain file. Here is the code so far: #!/bin/bash ps -e | sort | more > psfile When I execute the script nothing happens since i assume the output was redirected to the file called psfile. When I try to look at the... (1 Reply)
Discussion started by: mfruiz34
1 Replies

7. UNIX and Linux Applications

output redirection command

Dear All, ./waf --run scratch/myfirst > log.out 2>&1 The above is a command line to redirect the output to a file called log.out. what is the 2>&1 part for ? Thank you (2 Replies)
Discussion started by: knowledgeSeeker
2 Replies

8. Shell Programming and Scripting

Redirection of ls -l output

Hi I am making a script where i want to redirect the output of ls -l to a file Example #ls -l fil1.txt > /opt/temp/a.txt ac: No such file or directory I want to capture output of this command like here output is ac: No such file or directory can anyone help (4 Replies)
Discussion started by: anish19
4 Replies

9. Shell Programming and Scripting

output redirection

Hi all I was wondering if there was a slicker way of doing this without the file - awk '{print $2}' FS=":" "${FILE}" > "${TMPFILE}" { read M_GRP_ID || m_fail 1 "Error: Read failed 1 (${FUNCNAME})" read M_GRP_WAIT || m_fail 1 "Error: Read failed 2 (${FUNCNAME})" }... (6 Replies)
Discussion started by: steadyonabix
6 Replies

10. Shell Programming and Scripting

awk file redirection issue

So I'm writing a script which tries to parse human-readable addresses. Part of it is this: print $2, implode(A,1,AN," "), CITY, PROV, POST, COUNTRY, CITYCOUNT>2; CITYCOUNT is a variable between 0 and 3 counting the number of words in a city name. I'm trying to prnt 1 wherever that's greater... (5 Replies)
Discussion started by: Corona688
5 Replies
TOMATOES(6)															       TOMATOES(6)

NAME
tomatoes - Tomatoes smashing game SYNOPSIS
tomatoes SYNOPSIS
I Have No Tomatoes is an extreme leisure time activity idea of which culminates in the following question: How many tomatoes can you smash in ten short minutes? If you have the time to spare, this game has the vegetables just waiting to be eliminated! NOTES
Before starting the game, you should know that the game uses OpenGL for hardware accelerated 2d & 3d graphics. This means that you must have fully OpenGL compatible graphics card in your PC. Your card also needs to be able to use 512x512 textures, and this rules out Voodoo 1, 2 and 3 (limited to 256x256 textures). As for the CPU and memory requirements, I'd recommend something along the lines of Pentium II (or an AMD equivalent) and 64MB. The game works on much slower systems as well, as the game skips frames if the system can't keep up with the 60 FPS rate; this ensures that the game runs at the right speed, you just don't get very smooth animation. This game features solid game play with beautiful OpenGL API driven isometric 3d graphics and nice music. It also includes a MOD player, and you can use your own MOD-type music in the game background. Just copy your XM/S3M/IT/MOD - files to the music subdirectory of I Have No Tomatoes and the game plays them. You can press F1 to skip a song when ingame. There's room for 128 MODs. Btw, if you don't have any MOD music, ModArchive (www.modarchive.com <URL:www.modarchive.com>) is a good place to download some. CONFIGURATION
You may also want to set some options, such as the screen resolution and color depth. By default, I Have No Tomatoes starts fullscreen in 800x600 resolution, 32bpp. To fine-tune the preferences to suit your PC better, open the file config.cfg in a text editor (Notepad will do). Under Unix this file is stored in ~/.tomatoes/. Most likely you'll be interested in these lines: o video_mode = 800 x 600 o video_mode_color_depth = 32 o video_mode_fullscreen = 1 o sound_enabled = 1 To set the resolution, change the video_mode - line (some common resolutions include 640 x 480, 800 x 600, 1024 x 768). Most common color depths are 16 and 32, and sometimes 24. video_mode_fullscreen controls whether the game starts in fullscreen or in a window. When running in windowed mode, you can use any resolution you want (the 4:3 aspect ratio modes are still preferred). If you don't have a sound card (or want to turn the sounds off), set sound_enabled to 0 (zero). Finally, if you want to know how many frames your system draws per second (FPS), set show_fps to 1. FPS should be over 60 for smooth anima- tion. The default keys can be changed from the Options menu in game, so no need change them here. When you're satisfied with the config.cfg settings, by all means, proceed to start the game :) AUTHOR
You can contact the author by email at <lsoft@mbnet.fi>. Notice that since 12th of July, 2004 I've been in the army, so don't expect imme- diate responses. Be patient :) This man page was compiled by Helge Kreutzmann <debian@helgefjell.de> for the GNU/Linux project but it may be used by everybody else as well. SEE ALSO
Tomates homepage: http://tomatoes.sourceforge.net <URL:http://tomatoes.sourceforge.net> tomatoes 23 May 2012 TOMATOES(6)
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy