Reputation
2,585
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
7 16
Newest
 Yearling
Impact
~272k people reached

  • 0 posts edited
  • 0 helpful flags
  • 56 votes cast
Jan
29
comment Write output of `time` in a file, why are parentheses needed?
Thanks for the tip about using 'time' to get the executable-- handier than writing /usr/bin/time (or even command time :-)).
Jan
16
comment Handling duplicate programs names bash
Commands are only hashed for the lifetime of a running shell; and of course what is hashed is the first matching program in the path. So any such confusion is restricted to the lifetime of shell sessions that were already active when the new program was installed. There are ways to rebuild an out of date hash (see help hash under bash), but it's almost always simpler to just start a new session.
Dec
23
comment Assign multiple environment variables to a single variable and expand them on command
It's the same (except that the env command allows pre-expansion of the variable definition string, which was what the OP needs). I should have included the env, but my point applies equally to both versions: any variables in the command itself will be expanded before the custom definitions take effect. The adjusted environment is only useful inside the program. On the other hand, A=B; echo "$A" (as two commands) will of course echo B.
Dec
22
comment Assign multiple environment variables to a single variable and expand them on command
You should clarify that the contents of $env_args have no effect in variable expansion in the command string itself: env A=B echo "$A" echos nothing (or echos what $A already contained).
Dec
13
answered Best way to partially step through a 25k string?
Oct
30
comment How to display control characters (^C, ^D, ^[, …) differently in the shell
Readline is used by other programs, but also it is part of bash: it is a library linked into it. And today's shells, especially bash, do pretty much anything you can think up.
Oct
30
comment How do I get 'realpath' to find my symbolic link?
What is amazingly bad?
Sep
13
awarded  Yearling
Sep
9
comment Pulling out a certain value from a string via regex
oh, ok then... I missed the -P, thanks!
Sep
9
comment Pulling out a certain value from a string via regex
sed and grep are old programs, and they don't accept "full" modern regular expressions. The details differ by OS, so see the manual pages on your system to see what they do accept. Use egrep (or grep -E, which is the same) to enable some of the regexp functionality.
Sep
7
comment What is the fastest way to send massive amounts of data between two computers?
So gzip makes transfer slower, not faster. Maybe the data is too random to be effectively compressed-- did you check the compression ratio on those 80 GB? But clearly the compression speed can't keep up with the maximum capacity of the channel, so you're effectively throttling it. The problem will get worse if you set up a faster channel-- just leave out the compression. Maybe you can also leave out the secure connection (i.e. ssh), since you trust the network.
Aug
26
comment Loop ignores change of variable from a subshell in the background
+1 Signals are the right way to pass asynchronous notifications between processes.
Aug
7
awarded  Guru
Jun
19
awarded  Popular Question
Jun
17
answered How to quickly add some space in the terminal?
Jun
11
comment Is 'cat' a shell built-in or an external program?
Good answer. One addition: There are two versions of echo for historical reasons. It started out as an external command, then was added as a built-in. Early versions of the Bourne shell (/bin/sh) did not have it. /bin/echo was kept on for compatibility, since all sorts of things depended on it. (The same thing happened with test.)
Jun
8
revised How to produce a CR/LF in linux text docs?
added 434 characters in body
Jun
8
comment How to recognize which ASCII character in hex is this?
You mean \177 (decimal 127). \777 is a lot more than the maximum possible byte value.
Jun
8
answered How to produce a CR/LF in linux text docs?
Jun
4
answered ls -e option not available in linux