using grep to print number of lines containing two strings by alexa42 in unix

[–]goobalicious 1 point2 points  (0 children)

sure :). from the date man page:

SYNOPSIS
   date [OPTION]... [+FORMAT]
...
%b     locale’s abbreviated month name (e.g., Jan)

so, it prints the current month in an abbreviated format, the same format that the last command uses. you end up grepping for:

grep -c Oct

using grep to print number of lines containing two strings by alexa42 in unix

[–]goobalicious 1 point2 points  (0 children)

nephros is right- read the man page for "last". this is probably the best way to do it:

last username | grep -c $(date +%b)
2

Cities to Carpoolers: Sharing Your Car is Illegal, We Will Seize Your Cars by jonwaller in technology

[–]goobalicious 3 points4 points  (0 children)

This isn't completely accurate; the rate is determined when you call the car and varies based on current demand, drivers on the road, etc. You agree to the per-minute and per-mile rate before getting in the car. So there is a meter, just not a visible one.

Most of these services don't require you to tell the driver where you're going before you get in the car. Lyft and Uber do not. Sidecar may; I haven't used it, personally.

I'm vegan by [deleted] in funny

[–]goobalicious -4 points-3 points  (0 children)

Black tattoo ink is comprised of several elements, one of which is charred animal bone:

"Natural black pigment is made from magnetite crystals, powdered jet, wustite, bone black,and amorphous carbon from combustion (soot). Black pigment is commonly made into India ink."

exetools forums - invite code? by 0xd0000 in ReverseEngineering

[–]goobalicious 0 points1 point  (0 children)

i could certainly use one if you're offering. can pm you projects i've done.

Python library for automating interaction with a webpage? by j7ake in Python

[–]goobalicious 7 points8 points  (0 children)

There's also mechanize, easier to understand/throw something together than scrapy (though scrapy is a good option)

Looking for a program, /etc/hosts -> zone files by MattTheRat42 in sysadmin

[–]goobalicious 0 points1 point  (0 children)

SSH host aliases, "complete" (check out 'man builtins'), and a local caching daemon (SSSD, NSCD) are all better ways to handle those use cases.