89,546 reputation
12103217
bio website
location European Union
age
visits member for 2 years, 2 months
seen 2 hours ago

Aug
26
revised Pattern replacement
added 8 characters in body
Aug
26
answered Login by ssh , exec one command and i don't want to quit the bash
Aug
26
answered sed load substitute from file
Aug
26
comment sed load substitute from file
Note that it doesn't replace PATTERN with the content of the file, but any full line containing PATTERN with the content of the file.
Aug
26
comment How do you get a count of all file extensions on a hard drive using the gnu+linux terminal?
Note that sort | uniq -c doesn't count duplicates, but the number of occurrences of lines that sort the same in the current locale. For instance, for me a.②, b.③ c.① show up as 3 files because , and sort the same in my locale. You can fix the locale to C for sort and uniq -c with LC_ALL=C sort | LC_ALL=C uniq -c to really count duplicates.
Aug
26
revised How do you get a count of all file extensions on a hard drive using the gnu+linux terminal?
%p is for path. %f for filename, missing -xdev
Aug
25
revised Copying clipboard-content to file automatically and continiously?
added 299 characters in body
Aug
25
answered Copying clipboard-content to file automatically and continiously?
Aug
25
comment Command to print few consecutive lines from middle of a file
sed '6,$!d;20q' to avoid reading the whole input.
Aug
25
revised Command to print few consecutive lines from middle of a file
added 4 characters in body
Aug
25
revised Why is this binary file being changed?
added 644 characters in body
Aug
25
revised Why does MV(1) copy objects if permission to move denied?
remove reference to man section as `rename()` is more likely to be in section 2 (system calls).
Aug
25
answered How do you get a count of all file extensions on a hard drive using the gnu+linux terminal?
Aug
25
comment Is there any way to read lines from command output?
It's not necessarily faster. Because when reading from a pipe read has to read one byte at a time, while it can optimise things with reading larger chunks and seek backward when reading from a regular file. Best is to avoid while read loops altogether in the first place when possible. Also note that you need IFS= read -r line to read the line into $line. And leaving $line unquoted (invoking the split+glob operator) here probably doesn't make sense.
Aug
25
answered How can I tell if the pipe buffer is full?
Aug
25
revised Why is this binary file being changed?
added 3 characters in body
Aug
24
awarded  Nice Answer
Aug
24
revised Why is this binary file being changed?
typo formatting
Aug
24
revised Why is this binary file being changed?
typo formatting
Aug
24
revised Why is this binary file being changed?
added 4 characters in body