Reputation
7,419
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
14 24
Impact
~261k people reached

12h
comment Is it possible to echo into a file, but use indenting in the shell script source?
@user4668401: The final EOF must be left aligned, unless you use <<-EOF and indent the final EOF with tabs only.
13h
comment Is it possible to echo into a file, but use indenting in the shell script source?
@user4668401: Check the update.
14h
comment Is it possible to echo into a file, but use indenting in the shell script source?
@user4668401: Unfortunately, all leading tabs are removed.
Apr
21
comment Adding vertical space after command in bash
How would you implement it on a text console?
Apr
20
comment Listing functions defined in a “sourced” script?
declare -f lists all the declared functions.
Apr
17
comment bash: -eq vs. == and `bc` output type
If the number is always integer, why don't you just abs=${val#-}?
Apr
17
comment Set the TCP window scaling option to 4 & the TCP window size to 65535
superuser.com/q/902799/105002
Apr
17
comment Is there an alternative to sed that supports unicode?
@chaos: It works under en_US.UTF-8, but doesn't under C.
Apr
17
comment Is there an alternative to sed that supports unicode?
@chaos: I'm not getting the character back. Maybe the behaviour depends on locale?
Apr
14
comment Using the grep filter
What happens when you enclose the expresion in quotes? grep -i 'h[ae]llo' hello.txt
Apr
14
comment Using fixed strings in regular expressions?
Use Perl instead of bash: quotemeta.
Apr
11
comment Counting program fails in arithmetic test
Works for me. Have you really posted the code you're running? Seems like $counter is empty in your real code (use "$counter").
Apr
8
comment Bash regular expression comparison fail for hex byte \x01
Can you run the code through cat -v? It apparently uses the literal character ^A which disappears on StackOverflow. When I replaced the empty places with ^A, I got 0's everywhere (4.3.33(1)).
Apr
8
comment Remove special characters in a text file
@AomineDaiki: Check the update.
Apr
8
comment Remove special characters in a text file
@Archemar: fixed, thanks
Mar
31
comment Pattern matching and removal of that pattern using sed
stackoverflow.com/q/29369594/1030675
Mar
30
comment grep log lines of a specific id request
@jik: check the update.
Mar
30
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?
Mar
30
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.