LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Bash quickie] Get a "random" number (larger than zero, within a range) with "shuf" only

Posted Yesterday at 01:16 AM by the dsc (linux-related notes)
Updated Yesterday at 01:39 AM by the dsc (deweirdifying the wording)

It always annoys me when I see things like "cat file | grep pattern | sed ..." when just "sed" would suffice, but I was guilty of using seq only to shuf random numbers when shuf can do it by itself.

shuf -n 1 -i 0-999999999

(apparently the largest number you can get is $((9999**8)) (9999^8 in bash-math), larger than that it gets negative, for some reason )


You also don't need to do some fancy "echo -e" with several...
Member
Posted in Uncategorized
Views 32 Comments 0 the dsc is offline
Old

Time::TAI::Simple

Posted 07-30-2014 at 10:09 PM by ttk (Unpopular Positions: One Geek's Take)

Two things: First, my wife tells me this blog's interface sucks, and she hates trying to read it. Apparently it's horrible for users who do not have an LQ account. I'm kicking the tires on some alternatives.

Second, I've uploaded Time::TAI::Simple to CPAN. It provides a high-resolution count of seconds elapsed since the beginning of the epoch, much like Time::HiRes, but un-"corrects" for the IETF's leapsecond adjustments.

This means:
  • The number it returns
...
ttk
Member
Views 24 Comments 0 ttk is offline
Old

Step By Step Ubuntu 14.04 LTS (Trusty Tahr) LAMP Server Setup

Posted 07-30-2014 at 05:17 AM by sridhar11

In around 15 minutes, the time it takes to install Ubuntu Server Edition, you can have a LAMP (Linux, Apache, MySQL and PHP) server up and ready to go. This feature, exclusive to Ubuntu Server Edition, is available at the time of installation.The LAMP option means you don’t have to install and integrate each of the four separate LAMP components, a process which can take hours and requires someone who is skilled in the installation and configuration of the individual applications. Instead, you get...
Member
Posted in Uncategorized
Views 26 Comments 0 sridhar11 is offline
Old

KDE's "ark" as a command-line universal (un)archiver

Posted 07-28-2014 at 02:44 PM by the dsc (linux-related notes)
Tags ark, zip

For some reason I was having issues with some zip files. "Unzip" wouldn't unzip them, but ark (and perhaps other GUI archivers) would.

Fortunately ark can be used as a command line tool as well, which can be better than needlessly opening the full GUI just to make something so trivial. You still can invoke just the dialog, anyway.

But in order to extract something, for example, one can just use:

ark -b file.zip -o ./extantfolder

...
Member
Posted in Uncategorized
Views 37 Comments 0 the dsc is offline
Old

Kernel 3.16.0-5-exton (3.16.0-rc6)

Posted 07-28-2014 at 11:36 AM by exton (Exton's Blog)

I have compiled yet another Ubuntu/Debian kernel for 64 bit systems. This time kernel 3.16.0-5-exton, equivalent to Kernel.org’s kernel 3.16.0-rc6, released 140718.

Feature OVERVIEW for the Linux 3.16 kernel

READ MORE...
ExTiX Admin
Posted in Linux
Views 43 Comments 0 exton is offline

  



All times are GMT -5. The time now is 07:17 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration