Sponsored Content
Top Forums Shell Programming and Scripting Bc in shell script is creating blank files Post 302901823 by member2014 on Thursday 15th of May 2014 10:57:06 PM
Old 05-15-2014
Hi Don - Thanks for your reply.

What operating system are you using?
-- Unix

What shell are you using?
-- ksh

What errors are you getting from your script?
-- I am not getting any error from the script as such and is working as expected.

Is err_list the name of a file, or is it the name of a variable that contains the name of a file?
-- err_list is the name of a file which contains different error types a file can have.

Are you trying to see if there are more than 2% of a specific type of error as specified by one line in the file named by $err_list , or all types of errors specified by all of the lines in the file named by $err_list ?
-- I want to if all types of errors specified by all of the lines in the file name $err_list is more than 2%

How is feed_cnt set? -- This value is wordcount on the file (wc -l)

Changing the condition to -gt eliminated creating the blank files.
Any thoughts on how I can check the sum of all types of errors is more than 2% of the feed count?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Argument in shell script never blank

Hi All, I have a script which accepts a parameter which can either be blank, a specific value, or a wildcard value. But it never seems to be blank and the wildcard option seems to return the names of matching files in my directory. This happens even with the worlds simplest script that just... (1 Reply)
Discussion started by: cdines
1 Replies

2. UNIX for Dummies Questions & Answers

Script to move blank files

Anyone could give me an example of scrip to move blank files found into a dir? Thanks, Leandro Takeda (3 Replies)
Discussion started by: letakeda
3 Replies

3. Shell Programming and Scripting

Shell script: Remove blank lines

Hi gurus, I have this file with blank lines in it. How do i remove them in shell? I tried these commands but not working: sed '/^ *$/d' or sed '/^$/d' Anybody has a better idea pls? Also there are lines which starts with a single space, how do we remove the space in those lines?... (3 Replies)
Discussion started by: gholdbhurg
3 Replies

4. Shell Programming and Scripting

Blank Space is not appending in each row of CSV File - Shell Script

I am calling SQL script in my UNIX Shell script and trying to create the CSV file and my last column value of each row is 23 blank spaces. In my SQL script,the last column is like below. RPAD(' ',23,' ') -- Padding 23 blank Spaces The CSV file is generated but the sapce(23 spaces) is... (2 Replies)
Discussion started by: praka
2 Replies

5. Shell Programming and Scripting

Dynamically creating text files using shell script

Hi All, I want to create a shell script which dynamically create text files. i am using the following script $i=1 while do cat > test_$i.txt done but while running the script it was stopping(the cursor not going to next step, i have to enter ctrl+c to make it stop). it is creating only... (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies

6. Shell Programming and Scripting

Problem with blank spaces in shell script

Hi, I did the following script: DIR=`pwd`;for i in `find . -name GESTION -type d`;do cd $i/..;setfacl -R -m g:directores:rwx, GESTION;echo $DIR'/'$i;cd $DIR;done This code do the following actions: 1. Starting inside a folder, it's searching for any folder called "GESTION" 2. Every time... (3 Replies)
Discussion started by: argie01
3 Replies

7. Shell Programming and Scripting

shell script to check blank line?

Can someone help to transform the below logic into a shell script, might be easy for some of you. I have a file with below text, I need if the line has the ":" and the above to it is not a blank line should print " <text>: is incorrect format" Apple: vitamin = A... (0 Replies)
Discussion started by: usyseng
0 Replies

8. Shell Programming and Scripting

Need help creating a script to FTP files to a server and then delete the files that were transfered.

I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies

9. UNIX for Dummies Questions & Answers

Creating a blank string of a specified size

I want to have a string which has n blank spaces For example set N = 3 create str = " " So the length depends on the value of N. I am in tcsh. (4 Replies)
Discussion started by: kristinu
4 Replies

10. Shell Programming and Scripting

Remove Space and blank line from file in UNIX shell script

I have below file. I want to remove space at begining of every line and then after also remove blank line from file. I use below code for each operation. sed -e 's/^*//' < check.txt > check1.txt sed '/^\s*$/d' < check1.txt > check2.txt above code not remove all the space... (12 Replies)
Discussion started by: Mohin Jain
12 Replies
KATALYZER(1)							      libkate							      KATALYZER(1)

NAME
katalyzer - analyzes Kate streams and displays various information about them. SYNOPSIS
katalyzer [-hV] [-l types] [-l!] [ infile ] DESCRIPTION
katalyzer analyzes Kate streams and displays information about them. The type of information to select is selectable on the command line. Several multiplexed Kate streams may be analyzed at the same time. OPTIONS
-h Show command line help. -V Show version information. -l types Select the types of information to log, from the list below. These characters may be concatenated in a single -l option, as, eg, ls does (eg, katalyzer -l Ttv). Refer to the katalyzer command line help for a fully up to date list of types. e: errors p: packet c: container specific information T: Timing t: text v: event d: dump page and packets S: statistics -: miscellaneous information that doesn't belong in any other type -l! Shorthand to select all information to log. EXAMPLES
Analyzes any Kate stream in an Ogg file: katalyzer input.ogg Analyzes any Kate stream in an Ogg file, displaying only errors: katalyzer -l e input.ogg SEE ALSO
katedec(1), kateenc(1) libkate 0.4.1 03 december 2008 KATALYZER(1)
All times are GMT -4. The time now is 06:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy