How do I program using cat?
In this xkcd comic: they mention that real programmers use cat. Well, I was asking myself: how could you program using the cat command? ...
In this xkcd comic: they mention that real programmers use cat. Well, I was asking myself: how could you program using the cat command? ...
I'd like to copy several known files to another directory as a part of a post-build event, but don't want to have lines and lines of "copy [file] [destination] [switches]" in my build event. If possible, I'd like to list out the files I'd like to copy using a similar format: "copy [file 1] [file 2] [file 3] [etc...] [destination] [switch...
I'm using Putty (Command-line) and running a mysql> SELECT * FROM sometable; The 'sometable' has many fields and this results in many columns trying to be displayed in the terminal. The fields wrap onto the next line so it is very hard to line up Column titles with Field values. What solutions are there for viewing such data in term...
Hi, I am trying to create a php file that adds a user and create public_html directory in linux using exec() function(php). I can add following code to the php file exec("useradd -d /home/username -m username"); exec("mkdir /home/username/public_html"); now..I have to add public_html to smb.conf to work public_html on windows. is it...
I have a PHP CLI script, that processes a csv file, inserting it's content to a table in Postgresql database. This is on an Ubuntu server. I use schedtool to control the affinity of the whole script. Schedtool is used to launch the script itself with the -e option. Unfortunately with htop I see that the database thread is spawned as a co...
Can anyone help me with the compilation of C++ code in PHP on the Windows platform? I am using Microsoft Visual C++ 6.0. I have tried the following options which I knew, but none of them work: system('test.c') exec('test.c') The file 'test.c' has been placed in my php/www/ folder. I need to first compile the code, which makes test....
I would like to write simple scripts in C#. Stuff I would normally use .bat or 4NT .btm files for. Copying files, parsing text, asking user input, and so on. Fairly simple but doing this stuff right in a batch file is really hard (no exceptions for example). I'm familiar with command line "scripting" wrappers like AxScript so that gets ...
I'm trying to write a bat file so I can quickly launch into the Interactive Shell for one of my Django projects. Basically I need to write a python script that can launch "manage.py shell" and then be able to print from mysite.myapp.models import * The problem is manage.py shell cannot take additional arguments and launching into "mana...
I'm trying to download a static mirror of a wiki using wget. I only want the latest version of each article (not the full history or diffs between versions). It would be easy to just download the whole thing and delete unnecessary pages later, but doing so would take too much time and place an unnecessary strain on the server. There a...
I'm attempting to make a batch file to upload a file to ftp server. If I type it in manually it works fine but when i run the batch file it halts after it's connected... it says connected to domain.com. 220 microsoft ftp server User(domain.com:(none)): then nothing else. What the heck is going on here? Below is my batch file: ftp ...
I have a .jar file that I would like to be able to call without having to use a full file path to its location. For example, if the .jar file is located at: /some/path/to/thearchive.jar I'd like to be able to run it with: java -jar thearchive.jar instead of: java -jar /some/path/to/thearchive.jar when I'm elsewhere in the direct...
I know you can do it with a find, but is there a way to send the output of ls to mv in the unix command line? ...
Today's Daily Vim says this: Assuming you're using the bash shell, the following can be helpful when composing long command lines. Start typing on the command line and then type Ctrl-x Ctrl-e, it should drop you into your system's default editor (hopefully Vim) and allow you to edit the command line from there. Once finished, sa...
(Please forgive my ignorance on Excel add-ins, and feel free to correct my teminology where appropriate.) I have an Excel add-in that is used regularly. This add-in inserts a toolbar with a number of buttons. I want to automate the task of opening a spreadsheet in Excel and then "clicking" one of those buttons. In other words, I want...
We have a legacy application running on UNIX. Our windows users login to the application via a terminal application or commaind prompt. The app looks like one of those car-dealer like application which runs in dos mode interface. I am creating a new winform interface to the application but still want to keep the legacy application onlin...
Hi there! Currently I'm trying to execute some bundles using the capabilities of the EclipseStarter class. If I run my program directly from Eclipse the OSGi service bundle is loaded and I'm able to install and start other bundles. But if I export my java program to a executable jar-file and run it from the command line the environment...
Isn't that nicely recursive? I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more! Here's what I know how to set from .bat: Colors = (color XY) where x and y are hex digits for the predefined colors Prompt = (prompt $p$g) sets the prompt to "C:\...
Hi! I'm trying to call a class (main method) from command line (Windows) with Java. The class imports other classes (other jars). I always get "class not found exception" from a class that my main program imports. Here's what I tried: Add a CLASSPATH env. var with the path where the referenced lib resides (not working) I tried with ...
I would like to send a file using the POST command available on almost all linuxes which include Perl. I'm wondering how.. i would like to do something like : linux:currentdir/$ POST http://www.example.com/upload.php > myFileToUpload I guess i had probably to encode the file, i'm right, it's in base64 ? Isn't it ? I also read in th...
Is there a Linux command that will list all available commands and aliases for this terminal session? As if you typed 'a' and pressed tab, but for every letter of the alphabet. Or running 'alias' but also returning commands. Why? I'd like to run the following and see if a command is available: ListAllCommands | grep searchstr ...