21,080 reputation
34678
bio website
location United States
age
visits member for 3 years, 6 months
seen 5 hours ago

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.


10h
comment What does . ~/.bashrc command do?
pubs.opengroup.org/onlinepubs/9699919799/utilities/…
1d
comment helping get a shell script right from github
My guess is when you close a window to the system tray wmctrl can no longer see it (because it's not a window anymore). wmctrl is useful for focusing windows that are minimized or not in focus, but not ones that don't exist. The system tray is not the taskbar.
Jan
27
comment Run another command before running the command the user wants to run
@IonicăBizău The reason there is no infinite recursion is given in the bash manual: The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded is not expanded a second time. This means that one may alias ls to "ls -F", for instance, and Bash does not try to recursively expand the replacement text
Jan
23
comment Increment Numbers in URL?
What are you really trying to do? If you just want to print a list with bash: for i in {192..302}; do echo "http://sample.com/poilus/cwrgshs/$i/$i.html"; done. I smell an XY problem though.
Jan
23
comment In a Bash if condition, how to check whether any files matching a simple wildcard expression exist?
Your answer is different from @ChrisDown's because you parse ls output whereas he does not (he only checks its exit status). Due to the complexities involved with parsing ls output, the fact that ChrisDown avoids it entirely makes his answer more robust and correct than yours, even if yours will work in the many cases where "reasonable" file names (i.e. not containing whitespace) are concerned.
Jan
14
comment Vim colors conflicting with terminal ones
As vim runs in a 256 color terminal it will be limited to the 256 colors the terminal uses, and there is no full RGB terminal I am aware of so @al92's suggestion is unlikely to be possible. The closest you can get is to come up with a scripted command to change terminal colors and arrange to have it run every time you open and close vim to set and reset the terminal colors.
Jan
13
awarded  Nice Answer
Jan
8
comment Bash: kill background jobs
@fersarr Here you go
Dec
27
comment How do I get the old `du` behaviour back?
Have you considered du -c?
Dec
27
reviewed Reviewed How to force a device to be mounted as Mass Media Storage (MMS) rather than Media Transfer Protocol (MTP)?
Dec
21
reviewed Close How to list filenames within a folder based on a pattern supplied?
Dec
21
reviewed Close Bash script spawns many new processes of itself
Dec
19
comment sudo - ubuntu 12.04
Are you sure you aren't in the sudo or admin group? Maybe there is something in /etc/sudoers.d?
Dec
17
awarded  Good Answer
Dec
17
comment awk manipulation of file
@user3138373 It's just a tab to separate gene and coord into separate columns.
Dec
17
answered awk manipulation of file
Dec
16
comment awk array using number as value did not work
@Karli Update your question. You said you corrected your code so update your question and then provide more information about the problem.
Dec
16
comment awk array using number as value did not work
If the reference file is missing a column in some rows then your reference file is broken and you should fix the file. Go type in a 0 for every missing number.
Dec
16
comment awk array using number as value did not work
Your awk code does not match your English description. According to your English description of your desired output, you should have if ($1 in a) $2 = a[$1]; print and for the second part if ($1 in b) $3 = b[$1] + $3 - 1; $4 = b[$1] + $4 - 1; print.
Dec
15
answered cUrl : Argument list too long