Reputation
15,378
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
2 30 45
Newest
 Good Answer
Impact
~1.9m people reached

1h
comment How to make a script delete a directory after checking for its existence?
@It'sWillem, sure. rmdir and rm do different things and behave differently.
2d
comment How to destroy Ubuntu the best way
Except it doesn't. sudo rm -rf / will output the following two lines: rm: it is dangerous to operate recursively on '/' and rm: use --no-preserve-root to override this failsafe. (and not actually remove any files at all)
2d
answered How to make a script delete a directory after checking for its existence?
2d
reviewed Approve Try to execute a script (adduser.sh) in root /$
2d
revised Make echo ignore spaces?
minor typo
2d
answered Make echo ignore spaces?
2d
comment find: unknown predicate
@isomorphismes, that line will not produce that error message on its own. It must be caused by other factors. E.g. if you try to put the find command in a variable, then run that variable, that is a plausible way to get that type of error. If that's the case, the solution is simple; don't put commands in variables.
Jun
19
comment How to change extension of multiple files from command line?
@pqnet, ${1%.abc} is defined by POSIX, if that's what you're referring to.
Jun
19
comment retain white spaces in fields when using awk
\s matches an s in nawk. Use the standard [[:blank:]] or [[:space:]] instead of the perl-isms. As far as I know, only GNU awk treats \s as whitespace.
Jun
16
awarded  Good Answer
Jun
12
comment Should I alphabetically order the flags in a command as good practice?
Strictly speaking, find only has a few options, POSIX only defines the two options -H and -L. The GNU find in Ubuntu has a few more options, but -type and -name etc are considered operators, not options. And for operators, order usually matters.
Jun
10
comment Are terminal and shell the same?
@KorayTugay, when you run a shell script from cron or via a desktop launcher (where you have not checked "run in terminal"), you're using a shell without a terminal.
Jun
1
comment How to batch rename files but not directories?
@Serg With [ ... ] instead, then quotes would be necessary, but [[ ... ]] is a shell keyword and is parsed differently, so quotes there are optional. See BashFAQ 31 for more on the differences.
May
29
revised using Yad with shell script and user input
formatting
May
29
comment using Yad with shell script and user input
The code shown does not assign the Url variable at any point. Perhaps you want if Url=$(yad ...); then wget ... "$Url"; ... ?
May
29
comment How to start multi-threading multiple processes with one command
@heemayl, why? that just makes the shell lose control over it; gains nothing as far as I can tell.
May
29
comment Error executing “./configure” command : bash: ./configure: No such file or directory
Look for a file named INSTALL or README among the extracted files
May
26
comment shell script in /etc/profile.d not running at startup
Are you sure the PATH variable is not getting overwritten somewhere else? You can run this to see what's going on: BASH_XTRACEFD=3 PS4='+ $BASH_SOURCE:$LINENO:' bash -xlic '' 3> /tmp/xtrace-output.txt. Then look through /tmp/xtrace-output.txt.
May
26
comment How to add and pass system password as a variable in a script
@Eka, which is why I suggested doing it for the shutdown command, not your script.
May
24
comment no echo in bash shell script loop
Are you sure it finds any zip files? Try running it with the -x option enabled. E.g. bash -x thatscript, or temporarily change the shebang to #!/bin/bash -x