1,323 reputation
211
bio website Idonthaveany
location Rainbow, ME
age 36
visits member for 1 year, 4 months
seen yesterday

Way up high...


Mar
29
answered Why let command doesn't work to add real numbers?
Dec
4
comment Bash error when trying to execute a file
@Carl, that's a known problem with udisk, that by default will mount vfat with the showexec option. You could either write your own udev rule (tedious), or unmount your volume, and remount it by hand: mount /dev/sda3 /mount/point.
Dec
3
comment How to increment a variable in bash?
or ((++var)) or ((var=var+1)) or ((var+=1)).
Dec
2
awarded  Yearling
Nov
24
answered Bash error when trying to execute a file
Nov
18
awarded  Enthusiast
Nov
16
comment Count Number of Lines the begin with date and timestamp
words=( $line ) looks rather dangerous if, e.g., there's a glob character in the line. Moreover it seems rather useless, as read -r -a words will do the job!
Nov
11
comment Why does this bash script not work?
$* is broken if you give parameters containing spaces. "$*" expands to just one word, so it's not good. The only possibility is "$@" (quoted) that will work regardless how funny the symbols are in the arguments.
Nov
11
comment Bash: get current working directory name, but not full path
thanks! now you deserve +1. :). Err... no not yet, you should also quote ${PWD##*/} in the echo statement. In fact, it's better to use printf '%s\n' "${PWD##*/}" so that it works even if you're in directory -e.
Nov
11
comment Why does this bash script not work?
My comments are never helpful. Oh, unless you're willing to learn the difference between $* and $@, in which case you can have a look at the references online. It's free, I've been told. For example this reference about Bash's special parameters.
Nov
11
comment Why does this bash script not work?
No, never use $* unless you know exactly what it means. Use "$@" (with quotes) instead.
Nov
10
answered Home directory not being created
Nov
8
comment Copying specific subfolders with directory structure to a new folder
@RaduRădeanu Maybe, but the rsync solution as you showed it, is not applicable to the general case either: if there are many folders to exclude, it's tedious and error prone to --exclude them all. Moreover, with the --exclude feature, you potentially exclude a f03 file that could be contained in a fo directory.
Nov
8
comment Copying specific subfolders with directory structure to a new folder
@RaduRădeanu Why isn't it the best? :)
Nov
8
revised Copying specific subfolders with directory structure to a new folder
added 1023 characters in body
Nov
8
answered Copying specific subfolders with directory structure to a new folder
Nov
3
revised Add my own command to the PATH
added 161 characters in body
Nov
3
comment Add my own command to the PATH
The question you link is nice, but some information is outdated. Actually it's a messy post with good and bad things, and I guess it's better for the OP if we answer specifically his question here. Cheers :).
Nov
3
revised Add my own command to the PATH
added 299 characters in body
Nov
3
comment Add my own command to the PATH
@RaduRădeanu You're right, I don't exactly answer the question, instead I give what the OP should do to make things work. Regarding the scary advice, I'll edit my post ;).