6,739 reputation
1220
bio website e-choroba.blogspot.cz
location Czech Republic
age 39
visits member for 3 years, 3 months
seen 12 hours ago

Bash, Perl, Linux. Programming & teaching.


Mar
11
comment How do I update the dates (by 30 days) in the files going to that specific location in unix?
Note that some date and time combinations are invalid: TZ=America/Sao_Paulo date -d '2012-10-21T00:00'
Mar
9
answered Match and delete lines with ~100 strings
Mar
9
answered Bash: How to create an alias in .bashrc for awk with parameters
Mar
9
comment Variable related to variable
@KrzysztofSzewczyk: You can, but it won't change the value of the variables $PATH and $LD_LIBRARY_PATH.
Mar
9
answered Variable related to variable
Mar
6
comment Why is a variable passed to the su command, but not an array from the same scope?
No. When piped to xxd, the double quotes correspond to 22 in hex.
Mar
5
comment Simple method to find the number of seconds between two (non-standard) date formats?
@Janis: Note that for existing times, the script answers the question.
Mar
5
comment Simple method to find the number of seconds between two (non-standard) date formats?
@Janis: If the times come from a different timezone than the locally (configured) one, this could break. Try TZ=America/New_York date -d 'Mar 8 02:00:00 2015'
Mar
5
answered Simple method to find the number of seconds between two (non-standard) date formats?
Mar
5
comment Simple method to find the number of seconds between two (non-standard) date formats?
Irrelevant? Are you aware that Daylight Saving Time changes don't happen at the same moment in all the timezones?
Mar
5
comment Simple method to find the number of seconds between two (non-standard) date formats?
Difference in what time zone?
Mar
5
answered How can I capture the common characters between two strings
Mar
5
comment Why is a variable passed to the su command, but not an array from the same scope?
Pardon? ${var[@]} should do word splitting according to the documentation (see man bash).
Mar
4
comment Why is a variable passed to the su command, but not an array from the same scope?
Yes. BASH_VERSION=4.2.53(1)-release, OpenSUSE 13.1.
Mar
4
comment Why is a variable passed to the su command, but not an array from the same scope?
Strange. I'm getting two: -c: line X: syntax error: unexpected end of file
Mar
4
comment Why is a variable passed to the su command, but not an array from the same scope?
su is probably clever enough to glue the parts back together.
Mar
4
comment Why is a variable passed to the su command, but not an array from the same scope?
@GreggLeventhal: You're right. Does it work with a @, though?
Mar
4
comment Why is a variable passed to the su command, but not an array from the same scope?
@GreggLeventhal: Did you replace the @ in double quotes, right?
Mar
4
answered Why is a variable passed to the su command, but not an array from the same scope?
Mar
2
answered Sed alternative for search and replace on very long lines