5,673 reputation
818
bio website e-choroba.blogspot.cz
location Czech Republic
age 38
visits member for 2 years, 11 months
seen 2 days ago

Bash, Perl, Linux. Programming & teaching.


May
22
revised How to mark dates which are in the past?
added 309 characters in body
May
13
revised How to split such a string into array in bash
added 545 characters in body
May
13
comment How to split such a string into array in bash
@user67524: Read about Parameter Expansion in man bash. To remove the parts, use str=${str#STRING: "}; str=${str%"}.
May
13
revised How to split such a string into array in bash
added 180 characters in body
May
13
answered How to split such a string into array in bash
May
11
comment bash using grep and sed
@user65751: $1 and $2 are the first and second argument of the script. Curly brackets are used for parameter expansion. Have you read the passages in man bash?
May
11
awarded  Good Answer
May
10
comment bash using grep and sed
@user65751: NAMES is not an array here, just a string. When used without double quotes, it gets split to words in for f in $NAMES.
May
10
answered bash using grep and sed
May
10
revised bash using grep and sed
code formatting
May
10
comment Fastest `uniq` tool in linux
Have you tried running them, possibly with time?
May
9
answered How to mark dates which are in the past?
May
7
comment Take a sum based upon particular columns
@terdon: As mentioned in the reply.
May
7
answered Take a sum based upon particular columns
May
7
answered Duplicates in history file even after HISTCONTROL specified
May
6
answered How to delete a line if string is the only thing on the line
May
6
comment Why is this RPM “uninstallable”?
Read the first line again. Or the second one. The RPM is readable, correct arch, good version, but it has a dependency that is not available.
May
2
comment How can I extract the numbers in the file using sed or any other tool?
@Jim: Nothing. That's why you can omit it in some versions of sed. Also, some versions support -r in which you don't have to backslash () and + etc.
May
2
answered How can I extract the numbers in the file using sed or any other tool?
May
1
answered What is the difference between invoking a perl script via sh or perl