I'm running the Python CLI under Linux:
bla:visualization> python
Python 2.1.1 (#18, Nov 1 2001, 11:15:13)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>>
For some reason the arrow keys and the delete key don't work:
delete:
>>> x^H^H^H
up arrow:...
Case in point. I want to know if some set of files have as a first line '------'.
So,
for file in *.txt
do
if [[ `head -1 "$file"` == "------" ]]
then
echo "$file starts with dashes"
fi
done
Thing is, head returns the content with a newline, but "------" does not have a newline.
Why does it work?
...
I was just wondering what is best for performance when making a web service in Perl.
Is it best to have as short as possible .pl script and put as much code as possible in a module that is used by the .pl script, or doesn't it impact performance if i don't use a module at all?
I am using mod_perl on a CentOS Linux box with perl 5.8.8....
I have a huge SQL file that gets executed on the server. The dump is from my machine and in it there are a few settings relating to my machine. So basically, I want every occurance of "c://temp" to be replace by "//home//some//blah"
How can this be done from the command line?
...
I work at a large university and much of my department's backup requirements are provided by central network services. However, many of the users have collections of large files such as medical imaging scans, which exceed the central storage available to them.
I am seeking to provide an improved backup solution for departmental resource...
hi there,
i'm looking into developing a console-app in python which should be able to run under windows as well as linux. for this, i'd really like to use a high-level console library like curses. however, as far as i know, curses is not available on windows. what other options do i have? unfortunately, using cygwin under windows is not...
A similiar (less descriptive) post is here.
I'm trying to roll my own tool chain using recent releases on Ubuntu and was hoping there was enough of a Linux community here that I could get specific advice on certain problems as they come up.
With everyone's help I'd like to see this turn into a useful reference eventually.
First off ...
I'm writing a collaborative project designed to allow code contributions from users. Users will be able to extend a class, add functionality etc, and submit the code back to the server for regular execution.
Is there a safe way to execute users' PHP code? A foolproof sanitizing method? What about infinite loops? Or should I offer a diff...
Inspired by this question
http://stackoverflow.com/questions/1237489/how-can-i-force-gdb-to-disassemble
and related to this one
http://stackoverflow.com/questions/1245809/what-is-int-21h
How does an actually system call happen under linux? what happens when the call is performed, until the actual kernel routine is invoked ?
...
hi
im working in php on suse11.0 my problem is when i type a wrong syntax or query it doesnt show error only blank page shown at this situtaion
thanks
...
This is quite a low-level (low in the sense of "closer to the metal") question.
I was wondering if any of you could point me to documentation, explanations, etc. of how, upon receiving a Unicode character (or any character code, but I'm particularly interested in the Unicode Standard) the console in Windows, good ol' cmd.exe (using, say...
Is there a way to parse input and output from bash commands in an interactive terminal before they reach the screen ? I was thinking maybe something in .bashrc, but I'm new to using bash.
For example:
I type "ls /home/foo/bar/"
That gets passed through a script that replaces all instances of 'bar' with 'eggs'
"ls /home/foo/eggs/" gets...
I'm a developer of a MMO game and currently we're at my company facing some scalability issues which, I think, can be resolved with proper clustering of the game world.
I don't really want to reinvent the wheel that's why I think Linux Virtual Server could be a good choice especially with some Level 7 load balancing technique.
I'm cur...
Background
I'm at the planning stages of a DIY project that'll help me automate some hardware at my house. It's probably also worthwhile to mention that I've got almost no experience with web-related development.
The Basics
http://img7.imageshack.us/img7/4706/drawingo.png -- I can't seem to embed the diagram.
In order to simplify ...
I have some threaded code using PThreads on Linux that, I suspect, is suffering from excessive lock contention. What tools are available for me to measure this?
Solaris has DTrace and plockstat. Is there something similar on Linux? (I know about a recent DTrace port for Linux but it doesn't seem to be ready for prime time yet.)
...
Is there any simply way how to create a case insensitive (String -> String) Glib Hash Table?
The result should fit this:
GHashTable *table;
//there should be definition of table
g_hash_table_insert(table, "KeY", "Something"); //insert
//every command should return the line in table
g_hash_table_lookup(table, "Key");
g_hash_table_look...
I want to try python purple but I don't have debian. Is there a way to get it to run on either windows or a different linux?
...
cat /dev/urandom is always a fun way to create scrolling characters on your display but in that output, there is too many non character output.
now i was thinking, is there an easy way to encode on the commandline it in such way that all of itś output are readable characters, base64 or uuencode for example.
note that i prefer solutions...
Hi!
I'm trying to make a bash script in linux where some encrypted data is embedded and then retrieved and decrypted with openssl, like this:
cat | openssl des3 -d -a -salt -pass pass:asdf > output.txt <<EOF
U2FsdGVkX1/zN55FdyL5j1nbDVt5vK4V3WLQrnHPoycCJPwWO0ei3PCrrMqPaxUH.....blablablah data
EOF
The only problem with this, that would...
The Ruby on Rails website recommends installing Ruby from source under Linux.
I encountered a number of C library problems building ruby from source on a clean install of Unbuntu 9.
All the instructions I found on the net about installing ruby on ubuntu have involved using the prepackaged (.deb-based) ruby. Clearly this isn't what the r...