Reputation
6,642
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
10 25
Newest
 bash
Impact
~243k people reached

Jun
29
answered get rid of character
Jun
24
revised matrix operation in bash
added 3961 characters in body
Jun
24
revised matrix operation in bash
added 373 characters in body
Jun
24
revised matrix operation in bash
added 381 characters in body
Jun
24
comment matrix operation in bash
It's a nice language. A lot slower than perl for a job like this.
Jun
24
answered matrix operation in bash
Jun
23
comment Concatenate two files and separate them with a newline
+1. IMO the last answer is the best: the command substitution $(cat file) will strip any trailing newlines, and echo will explicitly add one. FYI, bash has a builtin for $(cat file) ==> $(<file) -- save a few microseconds. And with one command: printf "%s\n" "$(<k.txt)" "$(<h.txt)"
Jun
12
comment How do I remove comments of a file?
I would make the mv command conditional on sed completing successfully: sed '/^\#/d' myFile > tt && mv tt myFile -- or let sed handle the temp file: sed -i '/^\#/d' myFile
Jun
5
reviewed Approve Create an application's shortcut to launch it from Terminal?
Jun
5
revised Create an application's shortcut to launch it from Terminal?
added 165 characters in body
Jun
5
answered Create an application's shortcut to launch it from Terminal?
Jun
4
comment Setting paths in Fish like in Bash?
If that's in your config.fish, your fish_user_paths variable will grow and grow and grow. Instead of appending every time you launch a shell, do set -U fish_user_path ~/Dev/ark/bin ~/bin/ ~/i386-elf/bin $GOPATH/bin
May
9
answered How to write a shell script to assign letter grades to numeric ranges?
May
8
comment Problem with spaces in file names
The problem here is not ls, it's for -- for iterates over (IFS separated) words given after the in keyword`
May
1
comment Parsing output of lsof or lshw to awk
Please show the command you're running, and the output.
Apr
24
comment What'd be a good SEd trick to list the properties of all X input devices?
It occurred to me that grep -oP '(?<=id=)\d+' would be more concise than the sed command
Apr
24
revised What'd be a good SEd trick to list the properties of all X input devices?
added 91 characters in body
Apr
24
answered What'd be a good SEd trick to list the properties of all X input devices?
Apr
22
comment How do I tell a shell script my password?
You will do sudo visudo -f /etc/sudoers.d/willem to create/edit that file
Apr
21
comment How do I tell a shell script my password?
Alternately, give yourself privilege to run sudo apt-get without a password. Create a file named /etc/sudoers.d/willem containing willem ALL = NOPASSWD: /usr/bin/apt-get -- assuming "willem" is your username