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

Bash, Perl, Linux. Programming & teaching.


1d
comment Pattern matching and removal of that pattern using sed
stackoverflow.com/q/29369594/1030675
2d
comment grep log lines of a specific id request
@jik: check the update.
2d
comment grep log lines of a specific id request
@jik: When I run it on your samples, I don't get any duplicates. Maybe replace the *.log with the actual mask that doesn't include output of your previous grep command?
2d
comment grep log lines of a specific id request
@jik: You don't show any such lines in the samples.
Mar
27
comment Removing line numbers from `od`'s output
Just try od | cut -b9- to only output from byte 9 on.
Mar
27
comment Why is my bash prompt getting bugged when I browse the history?
@NikosAlexandris: right at the beginning, \e[0m isn't enclosed in \[...\].
Mar
26
comment Combine lines of file to string
How does the input look like?
Mar
22
comment Double quotes in bash
What's in $2? What happens if you just double quote both the variables? --s "$1" "$2" -c
Mar
16
comment how to delete line from the XML file
Why do you need an ill formed XML file?
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
comment Variable related to variable
@KrzysztofSzewczyk: You can, but it won't change the value of the variables $PATH and $LD_LIBRARY_PATH.
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
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
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.