494 reputation
311
bio website sourceforge.net/projects/…
location Northeast
age
visits member for 3 years, 3 months
seen yesterday

Long time Linux user (currently kubuntu). Use Windows 98, and 7 when I have to. Programmed in many languages, currently using bash and awk for most things. Learning Python.

Have one project on sourceforge:

Duplex printing emulator for non-duplex printers (Linux)


1d
comment Get total duration of video files in a directory
Thanks, the following (maybe unformatted) works DUR=$(avprobe -loglevel quiet -show_format_entry duration "$1"); DUR=$(cut -d '.' -f 1 <<< "$DUR"); ((DUR_MIN=DUR/60)); echo "${DUR_MIN}" I truncated the fractional seconds to avoid processing a floating point value.
2d
comment Get total duration of video files in a directory
Can you do this (ffprobe method) with something like avconv? I can't find ffmpeg in my repos for Kubuntu 14.04 - so I don't have ffprobe either? I do have avprobe, but it doesn't like those arguments.
2d
comment Security implications of forgetting to quote a variable in bash/POSIX shells
I'm no bash expert, but I've been coding in it for over a decade. I used quotes a lot, but mainly to handle embedded blanks. Now, I'll use them a lot more! It would be nice if someone would expand on this answer to make it a little easier to absorb all the fine points. I got a lot of it, but I missed a lot too. It's a long post already, but I know there's a lot more here for me to learn. Thanks!
Nov
27
comment Is there a standalone tool which will write reports from CSV data files
I just took a look at csv2odf. Apparently it does a lot more than just converting the csv into a document. I'll have to study it more when I'm more awake.
Nov
27
comment Is there a standalone tool which will write reports from CSV data files
BTW, calc will import CSV directly (data sources), but I don't know how to take advantage of that to fill in a useful template and generate a report without doing it manually from scratch each time.
Nov
27
comment Is there a standalone tool which will write reports from CSV data files
I'm expecting to have to define layout and other parameters. I love automagical things, but this isn't a case where one would work. My concern is that I don't want to have to learn javascript, etc. just to get a report. Maybe if I knew more about calc than just how to sum a column ;), I could build a template that would actually do me some good. I do use spreadsheets, but mine are very primitive. I will take a look at the tool though. If you know of any tutorials on building templates to import simple data into, that would be useful.
Nov
1
comment Is it safe to move a file that's being appended to?
@laike9m - File system borders refers to the fact that a simple file system has to reside on one partition on one memory device like a disk drive. If you rename a file within the file system, all that changes is it's name in a directory entry. It still has the same inode - if it was in a filesystem based on inodes to start with - like most Linux filesystems are. But, if you move the file to another filesystem, the actual data has to be moved and the file will get a new inode from the new filesystem. This would disrupt any operations on the file which were in progress when this occurred.
Oct
7
comment What program displays volume/screen brightness under KDE?
Recently upgraded from Precise to Trusty. The bug with brightness levels not being restored when the screen turns on again appears to be fixed.
Oct
5
comment Unexpected EOF and syntax error
This looks like the cleanest answer so far. It uses select which was designed to do exactly what the OP requires. It puts the choices in an array which is a great way to handle data like this and makes it available for use elsewhere in the script. It uses break rather than exit so the script can do something else after this part is done.
Sep
20
comment How can I have pulseaudio always load a USB soundcard as the same sink every time I boot?
The pactl and pacmd command line tools may help as well. I discovered these very recently and still don't know much about them.
Sep
20
comment How can I have pulseaudio always load a USB soundcard as the same sink every time I boot?
No idea, but it sounds like something that would be handled by udev rules - something I am just starting to look into.
Aug
30
comment What is the difference between building from source and using an install package?
@ultrasawblade - You're obviously not paranoid enough! <G> - see cm.bell-labs.com/who/ken/trust.html for the full monty.
Aug
30
comment Is there a downside to deleting all of the broken symbolic links in a system?
One more possible reason for a broken symlink: a symlink to an actual file that only exists some of the time. E.g. in a work flow with deep paths, you might have a symlink to a work file (for convenience) which is deleted when the work flow is complete, but will be recreated during the next use of that work flow. /dev/modem is kind of like that because the actual device file it points to only exists when the physical device is connected.
Aug
24
comment Why doesn't the sudo command need the root password?
Just found sudo logging in /var/log/auth.log - along with a lot of other stuff including some IPs from China trying to get root ssh access to my system - so, if you just want to see sudo, you have to filter it through grep or similar.
Aug
24
comment Coloring different sources for tail
In addition to the great answers below, you may also want to check out unix.stackexchange.com/questions/26313/colored-find-output which shows how to do much more with colorizing output files.
Aug
24
comment Why doesn't the sudo command need the root password?
I haven't explored this, but I understand one of the features of sudo that su does not have is that it (is able to?) keep a log of what commands were run by which user to make it easier to trace problems back to their sources. I just looked on my kubuntu system and do not see such a log, so maybe this is not a default behavior.
Aug
12
comment How does Linux choose which application to open a file?
+1 for mentioning the file utility. It's very handy when things don't make sense.
Aug
6
comment How to write bash script to configure my displays when HDMI is plugged in or unplugged
I just upgraded from kubuntu 12.04 to 14.04.1. I was waiting to comment because I was hoping that would help, but nothing has changed. I still have to switch audio manually. I think I'll open a new question on SE Ask Ubuntu. I don't think any audio switches. I just tried vlc, dragonplayer, and amarok.
Aug
6
comment How to write bash script to configure my displays when HDMI is plugged in or unplugged
I just upgraded from kubuntu 12.04 to 14.04.1. I was waiting to comment because I was hoping that would help, but nothing has changed. I still have to switch audio manually. I think I'll open a new question on SE Ask Ubuntu. I don't think any audio switches. I just tried vlc, dragonplayer, and amarok.
Aug
3
comment How to delete this undeletable directory?
+1 for persistence! And for thorough documentation of everything you tried. We don't usually get to see what didn't work, but it's often very valuable to know.