Reputation
34,530
Next tag badge:
894/1000 score
177/200 answers
Badges
5 65 116
Newest
 Nice Answer
Impact
~2.3m people reached

1d
comment Which is better printf or echo?
@JamesTheAwesomeDude no, absolutely no technical advantage whatsoever. The only reason to use echo rather than printf is that the forma can be simpler. If you know what you're printing, echo foo is faster and easier to type than printf 'foo\n'. Apart from that, when writing scripts where a variable needs to be printed, there's never a good reason to use echo.
Apr
29
comment How to install downloaded .sh file?
Please edit your question and tell us i) where you saved the file; ii) the exact error you received.
Apr
29
comment how can i install jdk-8u91-linux-x64.tar.gz on ubuntu
Relevant: How can I install Sun JDK on a Debian based system?
Apr
29
comment how can i install jdk-8u91-linux-x64.tar.gz on ubuntu
Welcome to Ask Ubuntu! While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. I have made the edit for you but next time, please do it yourself.
Apr
26
comment How to kill proccess that spawns several java programs that each take a port
Yes, sometimes. Specifically if they've been launched in the background as is the case here.
Apr
26
comment How to kill proccess that spawns several java programs that each take a port
1) Do not use -9 unless absolutely necessary, that can leave your system in a dirty state. 2) Killing the parent won't kill the children if they've been launched in the background as shown in the OP's example.
Apr
25
comment Escaping in Bash
This is explained in the duplicate but, basically, you want something like: curl -k -u "$USER" -X "POST https://$SERVERIP/wapi/v2.1/record:txt -d name=myecord.mydomain.mytld" -d 'text="k=rsa;p=MIGfMA0GASqGSIb421QUA4GNADCBiQKBgQCfvgMo245lekN+eHQipbDcE"' -d "view=$VIEW"
Apr
18
comment Environmental variables
No, the one set in your .bashrc will overwrite the one in /etc/bash.bashrc. If that's not what's happening, you haven't described what you're doing in enough detail.
Apr
18
comment ssh connection timeout event though I'm connected in the separate terminal
Since you've asked on Unix & Linux, please delete this one.
Apr
16
comment I want to install vim but the following error appears
How are you installing it? What command did you run tat gave those errors? If you're installing from source: i) Why? See muru's comment above; ii) where did you get the source tarball from? Please edit your question and clarify what you're doing.
Apr
15
comment New Server New User
I'm sorry but this question is just too broad. You need to break it down into separate chunks, clearly explaining your needs for each bit. For example, you say "of course" a mail server. Why of course? What kind of machine are you setting up? What kind of work load? What kind of database? How would it be accessed? Start by reading up on the basics and then come back and ask about specific issues you're facing.
Apr
13
comment for expat.h… configure: error: expat.h not found
You need to end the find -exec command with \; : find . -name expat*.h -exec cp {} /home/akhil/Downloads/pdcom-3.0.7 \;
Apr
12
comment How do I merge tab-delimited files?
@kos you can do unlimited files with a oneliner: awk '{a[$NF]=$1"\t"a[$NF];} END{for(i in a){print a[i],i}}' file1 file2 file3 fileN
Apr
11
comment Gnome shell text getting messed up
What recent upgrade? Are you still using 15.04? If so, your question is off topic here since we don't deal with versions that are no longer supported. If you mean that you upgraded from 15.04, please edit your question and clarify.
Apr
8
comment List all environment variables, and show if they are exported or not
If you know the name of the variable, and can see that it isn't set, then it isn't exported. The thing is that what you're asking here gets quite complex when you take into account local shell variables, global environment variables etc. Simply put, if the variable is set in the parent shell but not available to the program, it is not exported.
Apr
8
comment List all environment variables, and show if they are exported or not
Could you explain why? This sounds like an XY problem, what problem do you need to solve that requires knowing whether the variable is exported?
Apr
5
comment How to Force Quit a not responding application?
Yes, I realized which is why I added it back. Still, it should be used as a last resort, not on the first try and not with sudo unless you know what you're doing. Don't get me wrong, this is a good answer, that's my upvote there :)
Apr
5
comment How to Force Quit a not responding application?
I removed the sudo because i) you should never run sudo unless necessary and ii) in this case, that would have killed all cases of vlc running on the system. Not only those belonging to the OP. I also removed the -9 because that is very aggressive and is not necessary here.
Apr
4
comment Bash Script to Drag and Drop a File to New Location
I don't understand, why don't you just drag and drop them if that's what you want? You seem to be asking how to drag into folder1 which will cause the dragged item to be moved into folder 2. Why don't you just drag it directly into folder2 in the first place?
Apr
4
comment Customise up and down keys to match cmd (point-in-time) functionality
@deejbk yes, this is not a solution, only a limited workaround. Bash has all sorts of nifty features for this though. They just don't involve using the up key. Have a look at spsneo.com/blog/2009/09/19/bash-history-tips-and-tricks and howtogeek.com/howto/44997/… for example. Do those help?