5,858 reputation
919
bio website e-choroba.blogspot.cz
location Czech Republic
age 38
visits member for 2 years, 11 months
seen Dec 18 at 14:19

Bash, Perl, Linux. Programming & teaching.


Dec
2
comment Shell glob expansion after loop variable substitution
How does it "not work" at the moment?
Nov
28
comment How do I use newlines inside () with sed?
@DisplayName: But it's a command substitution again, so it removes the trailing newlines...
Nov
28
comment How do I use newlines inside () with sed?
@DisplayName: Misplaced }: sqlinsertconvert8=$(echo "${sqlinsert8%:}" | sed la | sed '/kal/d')
Nov
28
comment How do I use newlines inside () with sed?
@DisplayName: Missing right }.
Nov
28
comment How do I use newlines inside () with sed?
@DisplayName: What do you mean? You can assign the substitution to a variable: y=${x%:}
Nov
28
comment How do I use newlines inside () with sed?
@jimmij: This will keep all the trailing newlines. If you don't want two of them, don't output them. Or, remove the last one, too: "${x%$'\n':}" (bash syntax).
Nov
26
comment How to test for unknown commands in shell script?
@Minix: In the extreme example I gave in my reply, how can you check with type when you don't know what a user will type in?
Nov
26
comment How to test for unknown commands in shell script?
@Minix: Without running a script, you can't tell what commands will be needed.
Nov
26
comment Confusion about basic bashscript loop - until/done
@USERID_UNK: man bash of course, maybe also Bash Hackers or Advanced Bash Scripting Guide.
Nov
26
comment Confusion about basic bashscript loop - until/done
@USERID_UNK: I see it in the terminal, it goes to the standard error.
Nov
19
comment How to iterate a zero padded integer in bash?
@jmunsch: I'd rather use pipes.
Nov
18
comment How to iterate a zero padded integer in bash?
@jmunsch: Perl should be there on any Linux. You can find it or install it on most *ix systems, too, as well as MS Windows.
Nov
18
comment How to iterate a zero padded integer in bash?
@jmunsch: Perl is not a part of bash. It's a programming language of its own.
Nov
4
comment OpenWRT missing OD (octal dump)
Do you have xxd?
Oct
23
comment count matches and mismatches group by
@HiaSen: what's wrong with the solution?
Oct
22
comment How do I stop screen from clobbering my titles?
If $PROMPT_COMMAND is empty, check $PS1.
Oct
17
comment How can I partition a set of words given pairs that must end up together?
Is A B D C E also correct for the first line?
Oct
10
comment Can you source a “here document”?
@mikeserv: In this particular case, the contents of the heredoc is just the command to filter another file.
Oct
10
comment Can you source a “here document”?
@mikeserv: Readability, maybe?
Oct
10
comment Can you source a “here document”?
@glennjackman: The = was just a placeholder.