Reputation
1,909
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 6 13
Newest
 Yearling
Impact
~110k people reached

Dec
15
awarded  Yearling
Nov
18
comment pipes - Inserting pipe to middle of string
I prefer jordanm's solution over this also, but your question was explicit about using a pipe, so that was the answer I provided. Given this clarification that you're open to solutions beyond what you asked for, I've updated my answer. As for the point of running a single loop, as I said in the answer, using a loop allows you to use a variable as your stdin rather than having to use xargs' arcane non-portable character replacement technique.
Nov
18
revised pipes - Inserting pipe to middle of string
add what the OP *wanted* rather than what he *asked for*
Nov
18
comment Command substitution
Did you perhaps edit this script on a Windows box, then copy it over to a Linux or Unix box without converting EOLs?
Nov
18
revised pipes - Inserting pipe to middle of string
deprecate xargs
Nov
18
comment pipes - Inserting pipe to middle of string
The dash is an argument to the command it follows. It's not a special character, like a variable or a pathname, which can be expanded into something else. There is a convention to allow the dash to denote a file that is actually stdin, but it is by no means universal, or enforced. Also, if supported, the dash would allow stdin to be the INPUT to the manage.py command, not an OPTION to it.
Nov
18
answered pipes - Inserting pipe to middle of string
Nov
9
comment sudoer file how to give a particular user full access to only certain file
Note that addgroup is a common Linux utility, but is not universal amongst other Unix-style operating systems. For example, the FreeBSD method to add a group would be pw groupadd special, and you'd use pw usermod username -G special to add that group to a user. The question doesn't mention any particular operating system, so it's best to provide portable solutions, or qualify your answer if it's limited to just one OS.
Oct
28
comment Get the current volume level in OS X Terminal CLI?
@A-B-B, great suggestion. Thanks for contributing.
Oct
26
comment Forcing Bash to use Perl RegEx Engine
For posterity, only GNU grep includes the -P option, and it's not universal. FreeBSD's grep is based on GNU, but the documentation states "This option is not supported in FreeBSD". In OSX, grep is also based on GNU, but the -P option isn't even mentioned in the man page. And on other unix systems whose grep is not GNU, you're unlikely to see -P anywhere at all. If there's the remote possibility you that portability may be useful to you in the future, I recommend avoiding OS-specific options like this.
Sep
18
comment How does reverse SSH tunneling work?
@Rucent88, I'm not sure what reduction would be possible. A client establishes a connection to a server. That's common terminology all across the world of networking. Local and remote machines seem pretty self evident. If you're confused about SSH or general unix terminology after reading the documentation, I'm sure you'll have no trouble finding people here very willing to answer any questions you may have.
Aug
19
comment Upgrade from FreeBSD 10.1 to 10.2 fails because of incorrect hash
Ah, yes, on my system too -- overzealous copy-and-paste. I've fixed the answer. Thanks! :)
Aug
19
revised Upgrade from FreeBSD 10.1 to 10.2 fails because of incorrect hash
correct path
Aug
18
answered Upgrade from FreeBSD 10.1 to 10.2 fails because of incorrect hash
Aug
10
awarded  Great Answer
Jul
8
revised How can I split a text file into multiple text files?
improve whitespace handling
Jul
8
comment How can I split a text file into multiple text files?
FWIW, the RT variable appears to be gawk-specific. This solution doesn't work for me using FreeBSD's awk.
Jun
22
awarded  Informed
May
29
comment How does reverse SSH tunneling work?
@erik, ah, the confusing part is because my eyes are bad -- I wasn't seeing the space before remotehost in your commands. Upon closer inspection, I see that your diagrams don't actually address the optional bind_address at all. Sorry for the confusion.
May
4
comment How does reverse SSH tunneling work?
Hey, Erik, I was just about to start recycling your images for a presentation I'm preparing, but ... something about your -R option seems wrong. [-R [bind_address:]port:host:hostport] is what's on the openssh man page. To create what's in your drawing, wouldn't you need -R remotehost:456:nearhost:123 ? In fact, your -L options look as if they're reversed as well (man page says -L [bind_address:]port:host:hostport). Am I missing something?