2,227 reputation
29
bio website e-choroba.blogspot.cz
location Czech Republic
age 37
visits member for 1 year, 4 months
seen 7 hours ago
stats profile views 75

Bash, Perl, Linux. Programming & teaching.


May
20
comment Can't indent heredoc to match nesting's indent
@JoelDavis: Just remove the quotes, keep the hyphen.
Apr
17
comment Unix command for pattern matching
@Bhushan: Works for me. What shell are you running?
Apr
9
comment read line by line and take a string in line and assign that string to the subsequent line using perl
@user36697: Now, my script gives the expected outputs in both the cases. I am not sure it is general enough, though, as the specification is still unclear.
Apr
8
comment read line by line and take a string in line and assign that string to the subsequent line using perl
@user36697: Then please give a more detailed specification.
Apr
8
comment read line by line and take a string in line and assign that string to the subsequent line using perl
Why is TRN changed to ARN at line 7? Why is the abcdedfg part not copied to the next line, too?
Mar
17
comment perl one liner + print VALUE in the end of the line
@yael: If there is nothing after the \E, you can ommit it.
Mar
15
comment Double and triple substitution in bash and zsh
@Profpatsch: Easy. In each step, the number of backslashes halves (so it is 2ⁿ, in fact).
Mar
15
comment Different behavior of $() and ``
To get the expected output, you have to escape the backslash with another backslash in backquotes: echo `eval echo \\$$VAR`
Mar
15
comment Double and triple substitution in bash and zsh
@Profpatsch: Added more examples.
Mar
9
comment Too big delay with xscreensaver on wrong password in OpenSUSE 12.2
I have the same problem. It existed in 12.1 as well.
Mar
8
comment Variable definition changes in Bash
man bash mentions omitting the colon: When not performing substring expansion, using the forms documented below, bash tests for a parameter that is unset or null. Omitting the colon results in a test only for a parameter that is unset.
Feb
21
comment Difference between “. myscript” and “./myscript”
Effectively they do a different thing, try running a script containing exit.
Feb
3
comment What's the equivalent to && when writing a bash script?
@ruakh: I find the exit status of let x++ for x=0 even worse. But I still use it sometimes. It really depends on what commands you need.
Jan
18
comment Alter path of find result
@Aaron: You can write a script that provides the change and then run it in exec. In the script, you can use Parameter Expansion or sed.
Jan
17
comment Alter path of find result
@ChrisDown: I meant a path containing /./. Better now?
Dec
18
comment How to test for possible conflicts while using alias in bashrc?
@math: The original question is tagged /bash.
Dec
17
comment How to test for possible conflicts while using alias in bashrc?
@math: type which tells you which is /usr/bin/which, so it is not a builtin. Therefore, it cannot tell you whether something is a builtin or not (e.g. which echo versus type echo).
Dec
4
comment Login script for bash not loading
@simona: As I already indicated, /bin/dash is not /bin/bash, therefore it does not read .bashrc. Please clarify what you mean by "it looks like it does not load etc."
Dec
1
comment Why no other distros/spins based on openSuSE?
They are so awesome there is no need to fork ;-)
Nov
29
comment Login script for bash not loading
@simona: What distribution do you use? How do you log in?