Reputation
15,757
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
17 47
Newest
 Nice Answer
Impact
~1.1m people reached

Dec
19
comment What does Bochs stand for?
bochs = box. a pune or play on words,
Dec
15
comment Where is my .sh script syntax error(s)?
try logfile="./$(hostname)_GetJava.txt" and then redirect output with 2>> "$logfile". recomputing the logfile filename every time is wasteful and prone to typos and other errors. and don't use backticks, they're obsolete and deprecated - use $( ... ) instead.
Dec
5
comment awk print out file with a row number
do you have to use non-standard prompts here? especially one that looks like a bolded redirection operator? I'm sure you think it looks pretty but please stick to the convention of $ for non-root prompt, # for root prompt, and % for csh.
Dec
5
comment Install Debian safely without destroying Windows
as for how to tell: since /dev/sda5 is the only partition even approximately close to the size of your empty D: partition, it's the only one that it can be.
Dec
5
comment Install Debian safely without destroying Windows
The difference is that some software shows disk sizes in powers-of-two (where 1kB is 1024, 1MB is 1048576 bytes etc - technically, these are now called kibibytes and mebibytes), and some show disk sizes in powers-of-10 (1KB = 1000, 1MB=1000000). The difference is small but adds up to a lot when you are talking about gigabytes/gibibytes of data. See en.wikipedia.org/wiki/Units_of_information
Dec
5
comment sort behaves weirdly with scientific notation
what OS & Version is it? Linux? Mac? Solaris? FreeBSD? Other?
Dec
5
comment syntax error near unexpected token `fi'
Alternatively, run the sql query just once (instead of 3 times), capture the output in a variable with $(), and printf the output to different files depending on exit status.
Dec
5
comment Command line tool to check when a URL was updated?
Note, though, that Last-Modified headers are completely useless on many sites because the pages are generated dynamically from a database and will always return a LM header of approximately now. This is often done deliberately as a cache-busting technique and to force re-fetches (and thus marketable page views) when the client requests the page with an If-Modified-Since request header.
Dec
5
comment Sed entire word with when replacing single letters, with BSD sed?
No, it doesn't. y// runs once over the entire input. Your series of s///g commands runs one after the other in sequence. First changing all cs to ks, then l to i then a to e then y to i and finally k to o (thus changing all the ks that used to be c).
Dec
5
comment Take output of array, and put into new array (perl script)
why not just do something like: ssh -q $workstation "count=$(ls /logs/$workstation | wc -l) ; [ $count -gt 0 ] && /tools/log_remover /logs/$workstation"? or install pdsh (Parallel Distributed Shell) from computing.llnl.gov/linux/pdsh.html - if you're writing for-loop wrappers around ssh then pdsh is exactly what you need.
Dec
5
comment Run bash script from curl failed while from file succeeded
No, actually, it's about training users to do things they shouldn't do, things that they should have more sense than to do. You're encouraging them to indulge in dangerous behaviour and teaching them that it's perfectly normal and OK to do that.
Dec
4
comment Run bash script from curl failed while from file succeeded
You might know that you are trustworthy but nobody else knows you from a bar of soap. By telling your users to run your script as root, you're telling them "trust me. give me unrestricted root access to your system". official debian repos are curated, and monitored and with a bug tracking system. your web site with your script is just a random web site, one amongst billions. If you seriously think what you are telling your users to do is in any way acceptable practice then you are simply not qualified to talk about security. you have decided that minor convenience is far more important.
Dec
4
comment How to create a disk image with a partition table that can be easily resized to the target device?
i thought you wanted to know how to set things up so that resizing would be easy. Anyway, you can use gparted as a graphical tool to resize partitions (it will also automatically resize the fs too), or you can use parted on he command-line, using parted's resizepart command. if you've set things up as i described above, you can just extend the rootfs to the end of the disk. You'll need to run resize2fs to resize the fs after the partition has been resized.
Dec
4
comment Make a shell script execute commands in telnet or programs
your most portable option is to use expect itself. it's an old, common tool installed on many systems already. the perl / python options not only require their interpreters to be installed (which is not uncommon) but also the relevant libraries (which is not so common)....they are much easier to work with and more flexible than expectitself, though.
Dec
4
comment Make a shell script execute commands in telnet or programs
you haven't provided anywhere near enough details to write any kind of script. it's not needed, though - there are many examples of expect etc scripts on this site (and on stack overflow and serverfault). Start with some of the links under the heading Related to the right. and also search the SE sites for expect and/or the perl and python libraries i mentioned.
Dec
4
comment Make a shell script execute commands in telnet or programs
Then it's too bad that sh (in any of its variations) isn't really up to the task. there's too many things that can go wrong (or are just unexpected) that a simple redirection sh script can't cope with. There's a reason why tools like expect and the others i mentioned exist - and that's because shell scripts aren't capable of doing the job reliably.
Dec
4
comment Run bash script from curl failed while from file succeeded
You are doing your users no favours at all by teaching them that security is irrelevant, or by treating them as idiots who can't follow simple instructions. Have some respect for your users, and assume they're at least moderately intelligent and capable. At the very least, warn them that by running your script without examining it, they are giving YOU complete root access to their system.
Dec
4
comment Make a shell script execute commands in telnet or programs
use expect or write a perl script that uses Expect.pm (or one of the perl Net::* modules like Net::Telnet or Net:SSH etc) or a python script that uses pexpect.
Dec
4
comment How to add the correct repositary in gedit?
don't post screenshots. they're unreadable. cat the text files and copy-paste the text. that's readable on any screen, at the viewer's preferred font size.
Dec
4
comment Run bash script from curl failed while from file succeeded
or are you writing this to go with some install instructions on your website? if so, please don't do that. there's already way too many people telling ignorant users to do that - and they really don't need to be taught that fetching random scripts from random web sites and running them without examination as root is an acceptable thing to do, Give them the instructions, tell them what to do. If you want to give them a script to automate the process, tell them to download it as a separate step and EXAMINE IT (and perhaps modify it to suit their system) before running it,