77,826 reputation
1082185
bio website
location European Union
age
visits member for 1 year, 11 months
seen 7 mins ago

3m
comment Root and my password are the same
Separate users doesn't necessarily mean separate User IDs. User IDs have no bearing on this. The primary key in /etc/passwd, /etc/shadow is the user name, not user ID (which is not even mentioned in /etc/shadow).
27m
comment How can I suppress the space between generated arguments during brace expansion?
No, brace expansion is not adding the space, it's creating several arguments to echo. That's echo that prints its arguments separated by spaces.
1h
comment How can I test if a variable is empty or contains only spaces?
You need [[ $param = *[!\ ]* ]] in mksh.
10h
comment Recover files after moving directory names?
Were the (non-hidden) files all renamed with #_* appended to their name?
15h
comment Using sed to replace characters between two patterns
Try sed $'/^NAME/{N;s/\\n/\t/;}'
16h
comment how to get the basename of complicated files
It only worked because set is a special builtin. For mksh, see thread.gmane.org/gmane.os.miros.mksh/424
16h
comment Sort installed applications according by usage frequency?
See unix.stackexchange.com/a/110446/22565
17h
comment how to get the basename of complicated files
Note that the above doesn't work in bash (except in sh emulation) and you get an odd behaviour with mksh
17h
comment Piping the output of ls or tree to less loses colors?
@JosephR. the other question is half-related but not a duplicate. Here we're talking ls (not tree) for which some implementations need to be told to force color output when the output doesn't go to a terminal (in addition to less -R being needed)
18h
comment how to get the basename of complicated files
The usual warning about basename vs ${var##*/}: it doesn't work properly for path/to/dir/ or /. You'd want basename -- "$filepath" (for paths that start with -).
20h
comment Finding a file which created X minutes back (without GNU/BSD find)
@Aravind, TZ=ZZZ0 touch defines the current timezone as being called ZZZ (the name doesn't matter so picking a random meaningless one to avoid confusion) and being 0 hours off from UTC for the touch command.
20h
comment how to remove all double quotes from csv except specific field
With GNU sed: sed 's/\s*"\s*//3g'
21h
comment When and how was the double-dash (--) introduced as an end of options delimiter in Unix/Linux?
@MarkPlotnick, actually the getopt as found on SysIII (1980) supports --.
1d
comment When and how was the double-dash (--) introduced as an end of options delimiter in Unix/Linux?
BSD4.3RENO at least had a getopt that supported --.
Jul
26
comment Which command would you use if you want to remove the password assigned to a group
Why would anybody downvote this question?
Jul
26
comment Resolve nested aliases to their source commands
Ctrl-Alt-e doesn't expand only aliases. It also expands variables, arithmetic and command substitutions (and process substitutions!), though not tilde or globs, all of them on the command line, so use with care! alias-expand-line would be a better widget but is not bound by default. See also Ctrl-X a in zsh to expand the alias under the cursor.
Jul
26
comment Resolve nested aliases to their source commands
@JosephR. to be taken with a grain of salt for recursive aliases (like alias ls='ls --colour')
Jul
26
comment Proper way to distribute shell scripts
Well, ~/.zshenv (where you want to force settings (generally env vars) for all the zsh's (interactive or not) invoked under your name, and generally not used except to work around some other non-zsh problem) is separate from the ~/.zshrc (the interactive customisation shell), so it's, a feature, not a bug. (you can use zsh -f) A bug is when some non-interactive bash shells read your ~/.bashrc (like over ssh and you have to add code to guard against that), or some interactive bash (the login ones) don't read it (and again, you have to add code in your ~/.bash_profile to work around it).
Jul
26
comment Proper way to distribute shell scripts
Some shells read your customisation file even when invoked to interpret scripts. That's why you generally use #! /bin/csh -f instead of #! /bin/csh for instance.
Jul
26
comment Proper way to distribute shell scripts
zsh has a feature that allows to restore the options to a know set in a local context (emulate -L zsh) which is used extensively in all the extensions shipped with zsh and written as zsh code. See how the bash completion system fails miserably if you set some options like failglob.