Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Annoying rounding issue in awk Post 302228976 by Indalecio on Tuesday 26th of August 2008 01:45:25 AM
Old 08-26-2008
Edit: nevermind, I need to test more
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

a very annoying problem

hi i got fbsd here,when i try to start my X server as an user I got hte following error. Fatal server error: xf86OpenConsole: Server must be running with root permissions You should be usig Xwrapper to start the server or xdm. We strongly advise against making the server SUID root! But... (2 Replies)
Discussion started by: Stormpie
2 Replies

2. Post Here to Contact Site Administrators and Moderators

Annoying tooltips

Hi Is there any way to turn off the (often ridiculously big) tooltips that are displayed when hovering over a topic in a topic list? It's driving me nuts. Thx. J (1 Reply)
Discussion started by: jgrogan
1 Replies

3. Shell Programming and Scripting

Rounding issue with awk

Hi Friends, I am trying to round following number. 0.07435000 echo "0.07435000"|awk '{printf "%s\n",$1*100}'|awk '{printf "%.2f\n",$1}' It returns: 7.435 It should return: 7.44 Any suggestion please? Thanks, Prashant (2 Replies)
Discussion started by: ppat7046
2 Replies

4. Shell Programming and Scripting

AWK rounding up numbers

Hi, I have managed to round up numbers by using the following command: echo "5.54" | awk '{printf "%.0f\n", $1}' result 6 How can I round up all the numbers in a column in a file and print the lines with the new calculated totals? Thanks, (3 Replies)
Discussion started by: keenboy100
3 Replies

5. Shell Programming and Scripting

awk, floating point and rounding

I had a person bring an interesting problem to me that appears to involve some sort of rounding inside awk. I've verified this with awk and nawk on Solaris as well as with gawk 3.1.5 on a Linux box. The original code fragment he brought me was thus: for (index=0; index < 1; index=index+.1) ... (4 Replies)
Discussion started by: mmyer2
4 Replies

6. Shell Programming and Scripting

awk calculation automatically rounding off the output

I have some calculation in my script which is similar to the below example . I find that sometimes when using large decimal digits, the output gets automatically rounded off and it is affecting the program. I am not able to understand what is happening here.. awk '{ a=6.32498922 a1=6.324... (5 Replies)
Discussion started by: wanderingmind16
5 Replies

7. Shell Programming and Scripting

printf (awk,perl,shell) float rounding issue

Hi guys, could someone throw some light on the following behaviour of printf (I'll start with info about the system and the tool/shell/interpreter versions)?: $ uname -a Linux linux-86if.site 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC 2011 (187dde0) x86_64 x86_64 x86_64... (9 Replies)
Discussion started by: elixir_sinari
9 Replies

8. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

9. Shell Programming and Scripting

How do I get out of the annoying > in bash???

Occasionally I make a mistake in my shell that results in there being a > for the prompt instead of the normal $. Today I accidentally left off a " in a sed command, sed s/\"//g" infile > outfile and then I get $ sed s/\"//g" infile > outfile > > I have never figured out how to get... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

10. Shell Programming and Scripting

[awk] rounding a float number?

Heyas Trying to calculate the total size of a file by reading its bitrate. Code snippet: fs_expected() { # # Returns the expected filesize in bytes # pr_str() { ff=$(cat $TMP.info) d="${ff#*bitrate: }" echo "${d%%,*}" | $AWK '{print $1}' | head -n 1 } t_BYTERATE=$((... (9 Replies)
Discussion started by: sea
9 Replies
fadecut(1)						      General Commands Manual							fadecut(1)

NAME
fadecut - Toolset to rip audiostreams, cut, fade in/out and tag the resulting audiofiles SYNOPSIS
fadecut -p <profile> [ OPTIONS ] DESCRIPTION
fadecut is a script to rip audio files from a livestream (using streamripper) and to process them automatically. Beginning and ending fo the audio files will be cut and faded in/out. So logos and advertising of radio stations will be automatically removed. In streaming mode fadecut is ripping audio files using streamripper. The downloaded audio files are cutted using silence detection and then faded in and out. Subsequently, the files are encoded to either ogg or mp3 and tagged with tags (title, artist, genre and comment pro- vided). In file mode fadecut is just processing already ripped audio files. An audio file which has already been processed is detected and will not be processed again. Not desired songs can be stored in a separate directory. This files are not processed anymore too. FOLDERS
fadecut is working with some standard folders. You may change them in your profile or fadecutrc done/ here you put all your songs which were already processed by fadecut and which you want to keep. See also new/ folder. dontlike/ in this folder you may put songs which you don't like. Fadecut is checking this folder before it is processing new files in the working folder. Null size files are ok. error/ whenever an error occurs while fadecut is processing a file, that file is moved to the error folder for later examining. incomplete/ this folder is created by streamripper. All not fully ripped songs are saved here. new/ processed songs are going here. Usually you may rip and process files with fadecut, they are going in to new/ folder, you listen to them and put good songs to the done/ folder. orig/ if you want to keep the original file (which is ripped by streamripper), you may use the -k option. fadecut is putting the ripped files untouched into that folder. OPTIONS
-c Create a new profile <profilename> -e Edit an existing profile <profilename> -i optional input <directory> -o optional output <directory> -k optional to keep the untouched original song in the /orig folder -d Debug: -d 0|1|2|3 (level 0 is standard, -d without number is like 1) -h Show this message -p Profile <profilename> -q Quiet -r Stream (and rip), start streamripper -v Verbose VARIABLES
STREAM_URL="http://streamurl" test ENCODING=ogg preferred destination fileformat. (ogg/mp3) GENRE="SwissPop" Processed files will get the above genre. COMMENT="Radio Swiss Pop" Processed files will get the above comment. TRIM_BEGIN=0 cut <n> seconds off the file in the beginning. TRIM_END=0 cut <n> seconds off the file at the end. FADE_IN=1 Fade in for <n> seconds. FADE_OUT=4 Fade out for <n> seconds. EXAMPLES
Create a new ripping profile fadecut -c test Edit/update profile test fadecut -e test Rip, cut and fade in-/out with profile test fadecut -p test -r Only cut and fade in-/out without ripping from livestream fadecut -p test SEE ALSO
id3v2(1), oggenc(1), sox(1), streamripper(1), lame(1) FILES
~/.fadecut/fadecutrc The main fadecut configuration file, executed with every start of fadecut ~/.fadecut/statslog.csv The statistics file ~/.fadecut/profiles The folder where all profiles are located RESOURCES
fadecut git website https://github.com/micressor/fadecut 0.1.0 fadecut(1)
All times are GMT -4. The time now is 11:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy