Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
3
Newest
 Commentator
Impact
~4k people reached

  • 0 posts edited
  • 0 helpful flags
  • 80 votes cast
Nov
20
comment Does bash have a hook that is run before executing a command?
@LarsH: Which version do you have? I have BASH_VERSION="4.3.11(1)-release" and it says "ARG is executed before every simple command."
Oct
16
comment Linux/Unix command to join N lines of input with delimiters?
If you have only 5 lines, you may not want to lose lines 4 and 5 just because you don't have line 6.
Oct
14
comment transferring files over two-hop SSH session
@grawity: Actually, it was the system-wide UseProxyIf in /etc/ssh/ssh_config that was preventing my ProxyCommand to take effect; UseProxyIf true solved this.
Oct
13
comment transferring files over two-hop SSH session
@grawity: Thanks. I tried to use ProxyCommand, but in my case it seems that the system-wide ProxyCommand in /etc/ssh/ssh_config takes effect and my setting in ~/.ssh/config is ignored.
Oct
9
comment transferring files over two-hop SSH session
I also found that -t was messing up the stream. The problem is, I want to define a shell script or alias as ssh -[t]A bridge.work.com ssh 10.10.10.130 and I need two of them, for interactive and non-interactive each!
Sep
4
comment Killing all instances of Chrome on the command-line?
-r is identical to --no-run-if-empty; i.e. "If the standard input is completely empty, do not run the command." You can look it up from man xargs or info xargs.
Sep
4
comment Killing all instances of Chrome on the command-line?
And it's a good habit to put -r in xargs: ps -o pid= -C chrome | xargs -r kill.
Sep
4
comment Killing all instances of Chrome on the command-line?
No need for another pipe through cut; ps can do it itself: ps -o pid= -C chrome | xargs kill.
Aug
21
comment How do I remove a device from the “Other Devices” list on the new tab page?
I still see some devices that I haven't used over 1 year, so the "aging out" is not happening.
Jul
11
comment How can I create a PDF from scanned images I have in my folder?
You probably need something like -units PixelsPerInch -density 180 added to convert as well. And you cannot make, for example, a Letter (8.5″×11″) document out of 3:4 images.
Jan
28
comment Easiest way to type a hyphen on the Mac?
In fact, what you said was a minus (U+2D) is a hyphen-minus, which can represent many distinct characters but is usually rendered like a hyphen in a proportional-width font. A minus (−, U+2212) has the same width, height and thickness as a plus sign (e.g. −+−+−). If you want an exclusive hyphen, it is U+2010 (‐).
Sep
13
comment How do I convert a bash array variable to a string delimited with newlines?
Shouldn't the last example be var=${var%?} instead? This is not a regular expression, so . will match only a period character.
Sep
6
comment What are the hex values of the Google logo colors?
That's the official one!
Dec
4
comment How do I search a page using a regular expression in Firefox?
"This add-on has been disabled by an administrator."