4,420 reputation
714
bio website e-choroba.blogspot.cz
location Czech Republic
age 38
visits member for 2 years, 6 months
seen Jul 12 at 21:08

Bash, Perl, Linux. Programming & teaching.


Jul
11
comment in bash, read after a pipe is not setting values
Or even read a b dump <<< '1 2 3 4 5'.
Jul
1
comment openSuse, new user cannot login
Have you checked the documentation of useradd? It says -p The encrypted password, as returned by crypt(3).
Jun
19
comment Forcing the system to allow me to insert any character in the file name
In MS Windows, d) is the correct answer.
Jun
17
comment Editing INI-like files with a script
Use Perl and metacpan.org/pod/Config::IniFiles
Jun
9
comment GREP / SED or AWK: Print entire paragraph in a file on pattern match
@IrfanN: On MSWin, you have to switch quotes perl -ne "BEGIN{ $/ = '' } print if /pattern/".
Jun
8
comment Convert all text from uppercase to lowercase and vice versa?
tr would be more suitable than sed.
Jun
8
comment Can't search for flags in qalter's man page?
What about man pages of other commands (e.g. ls)?
Jun
8
comment Can't search for flags in qalter's man page?
Works for me, pressing /-r plus Enter.
Jun
6
comment sed's c command outputs current line no matter what
+1 The fact is not mentioned in the man page.
Jun
3
comment Perl print the lines matching with the columns of file 1 and file2
Remove the not.
May
30
comment Remove given parts of a string with sed?
Usually it's better to use a parser to process HTML.
May
22
comment How to print the first three lines and last two lines of a file using perl?
@StephaneChazelas: With the full specification, I can show you how I would do it with a parser. I would need to see the files and understand what elements are needed.
May
22
comment How to print the first three lines and last two lines of a file using perl?
It seems your file is XML. Use a proper parser.
May
22
comment How to mark dates which are in the past?
@evachristine: updated, too.
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
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
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
comment Fastest `uniq` tool in linux
Have you tried running them, possibly with time?
May
7
comment Take a sum based upon particular columns
@terdon: As mentioned in the reply.
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.