Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integer expression expected #73

Open
hemmo opened this issue Mar 31, 2012 · 5 comments
Open

integer expression expected #73

hemmo opened this issue Mar 31, 2012 · 5 comments

Comments

@hemmo
Copy link

hemmo commented Mar 31, 2012

Problem at the line 665 of the script

lassi@etna:~/Videot/jw$ ./mkvdts2ac3.sh -w /mnt/disk0 ~/vmware\ shared/mchd-lehavre720p.mkv
mkvdts2ac3-1.6.0 - by Jake Wharton [email protected] and
Chris Hoekstra [email protected]

Extracting Timecodes:
Progress: 100%
Timecode extraction took: 00:01:22 (82 seconds)

Extracting DTS Track:
Progress: 100%
DTS track extracting took: 00:01:41 (101 seconds)

Converting DTS to AC3:
Progress: 100%
DTS track conversion took: 00:02:42 (162 seconds)

Muxing AC3 Track in:
Progress: 100%
Muxing AC3 track in took: 00:03:32 (212 seconds)

./mkvdts2ac3.sh: line 665: [: 7.52194e+10: integer expression expected
Moving new file over old file. DO NOT KILL THIS PROCESS OR YOU WILL EXPERIENCE DATA LOSS!
sending incremental file list
mchd-lehavre720p.new.mkv
4994713814 100% 16.28MB/s 0:04:52 (xfer#1, to-check=0/1)

sent 4995323627 bytes received 31 bytes 14012128.07 bytes/sec
total size is 4994713814 speedup is 1.00
File copy took: 00:05:58 (358 seconds)

Total processing time: 00:15:15 (915 seconds)

Filesize summary:
Original Filesize: 4,584,788 KB
Extracted DTS Filesize: 992,508 KB
Converted AC3 Filesize: 294,660 KB
Final Filesize: 4,877,656 KB
lassi@etna:~/Videot/jw$

The audio of the film works now in my popcorn hour a-100, so maybe this is not that big issue, but at least got me worried

@choekstr
Copy link
Collaborator

choekstr commented May 4, 2012

If you can replicate this then it would be helpful to add a 'bash -x' in front of your cmdline and attach the results in a text file. I don't have this on my system so there must be something unique on your system that is just throwing up an error but still continuing.

@n-i-x
Copy link

n-i-x commented May 28, 2012

It's not unique.. happens all the time for me. I'll get you the output.. I believe it's parsing the disk space incorrectly on some systems.

The error is only cosmetic.. it doesn't affect the conversion process at all.

@n-i-x
Copy link

n-i-x commented May 28, 2012

Here you go:

++ /usr/bin/du -k /tmp/some.new.mkv
++ cut -f1

  • MKVFILEDIFF=-927608
    ++ df -k .
    ++ tail -1
    ++ awk '{print $4*1024}'
  • DESTFREESPACE=3.25045e+12
  • '[' -927608 -gt 3.25045e+12 ']'
    /home/jrebeiro/bin/mkvdts2ac3.sh: line 665: [: 3.25045e+12: integer expression expected

Here is the output of the offending command run in the script:

$ df -k . | tail -1 | awk '{print $4*1024}'
3.25139e+12

My system details:

$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits:
max NF 32767
sprintf buffer 2040

$ uname -a
Linux ubuntu 2.6.32-41-generic #89-Ubuntu SMP Fri Apr 27 22:18:56 UTC 2012 x86_64 GNU/Linux

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"

I believe the following awk expression will fix the issue on line 664:

DESTFREESPACE=$(\df -k "$DEST" | tail -1 | awk '{printf ("%0.0f", $4*1024)}')

$ df -k . | tail -1 | awk '{printf ("%0.0f", $4*1024)}'
3251394998272

This needs to be tested on systems with GNU awk (I'm too lazy to do it myself) though I'm fairly certain it will just work.

@haimat
Copy link

haimat commented Feb 23, 2014

I have the same error and can confirm that the proposed command fixes the problem. Will this be changed in new version?

@Kilo-411
Copy link

Kilo-411 commented Jul 8, 2019

I have similar Issue
Mine is this after i fixed a Proot error 11

test-execute: command not found $ ./start-kali.sh bash: [: : integer expression expected $
....
Im running on oreo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants