I’m trying to compile java files on an EC2 instance, and am having trouble. I have several JAR files as well that are included in the classpath. The example would be a StockTrade.java (which is a stock trade object), which compiles completely without issue. In the same directory, there is the StockTradeGenerator.java, which will create StockTrade objects. When I try
Tag: command-line
Quick remote logging system?
I want to be about to quickly insert some logging into some testing using either (Linux) command line or Python. I don’t want to do anything system wide (e.g. re-configuring syslogd). I’ve done something like this before by doing: wget URL/logme?im=module_name&msg=hello_world And then just parsing the server log file. It’s a bit hackish and you have to URL encode all
Is it possible to somehow undo the results of the mv command?
Here’s the problem. I had a bunch of files in a directory. Then I created another directory in that directory. Then I cobbled together this command: This command was supposed to take all the files in the directory and move them to that newly-created directory, but instead of providing the name of the directory, I screwed up and typed 1,
How can I recursively search for multiple patterns on linux?
I am trying to find files that include either of the following two patterns: By AND, I mean a logical and. I am using the following command: to check if a file has INTO and SELECT, but this returns the string if either one exists, but I need both. Answer If the patterns have to occur on the same line,
Replacing strings with special characters in command line sed
I want to uncomment a line of a config file by replacing the line %% {some_string, []}, with {some_string, []} in the command line. I have tried a few different formats using sed: sed ‘s/%% {some_string, []},/{some_string, []}/’ filename sed “s/%% {some_string, []},/{some_string, []}/” filename sed “s/’%% {some_string, []},’/'{some_string, []}’/” filename sed ‘s/”%% {some_string, []},”/”{some_string, []}”/’ filename but every time
Running multiple Gradle commands in parallel on Linux shell
Please note: Although the two primary techs in this question are Spring Boot and Gradle, I really think this is a Linux/command-line question at heart, involving fore- and background processes! I’m trying to get my Spring Boot app to run in hot swap (“dev”) mode via Gradle. After reading this interesting DZone article, all it takes is a few easy
Replace line with double quotes
I want to replace a line with double quotes on OpenBox startup, like: with I use this command, but it does not work: It gives me this error: Answer The ampersand in the replacement string recalls the pattern in the search string. So you can just do this: Also, you can use single quotes on the outside, and double quotes
Comm command – unnecessary restriction?
This is a question about the comm command on linux command line. Why does it work on only sorted files? Why can’t it sort the files for us, then do its thing? To illustrate: If we have file1 and file2, and we wish to compare them using comm, we find that we obtain an unexpected result if either of the
How to Accept Standard Input in C from the Linux Command Line
I am trying to accept a string from the standard input in Linux, take the given string and change the ‘A'(s) and ‘a'(s) to ‘@’, and output the altered string. In linux I am running this: echo “This problem is an EASY one” | ./a2at My a2at.c program contains this: Any help would be really appreciated! I know that I
Python how to pass in an optional filename parameter when running a script to process a file
I have a python script that processes an XML file each day (it is transferred via SFTP to a remote directory, then temporarily copied to a local directory) and stores its information in a MySQL database. One of my parameters for the file is set to “date=today” so that the correct file is processed each day. This works fine and