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, []}/”…
Tag: linux
Prevent case statement from continually asking for input so that I can carry out subsequent commands
I have the following code which includes a case statement. My problem is that once a file is selected from the option menu, it subsequently keeps asking me to input further choices, but I only want to input one then carry out out the subsequent commands (in this case the subsequent command is at the bottom (e…
Sending a command to screen in linux
In order to run a data analysis program, installed on a Teensy 2.0 microcontroller running arduino, I have to go to the screen by typing screen -S trans -L /dev/ttyACM0 (the name of the screen is trans). Once in the new screen, I have to enter ‘s’ to start the scanning process. I am trying to writ…
unterminated `s’ command error – trying to remove extra double quote
I am trying to edit a single row in a text file, by removing an unnecessary double quote in front of the name, i.e. “THE DELEON FAMILY DE. After the change it should look like this: THE DELEON FAMILY DE. Here is my code: This is the error I get: Answer You are missing a the last / in the
Reading 2 byte at a time from a binary file
I have an elf file that called example. I wrote following code which it’s read the content of the example file in the binary mode and then I wanted to save their content in another file called example.binary. But when I run the following program it shows me a segmentation fault. What’s wrong with …
How to check a email in linux server automatically?
I have a Ubuntu 14 server, I have to assign a email account to this server, when some person write a email to this account, the server have to open this mail automatically, and check if there are a specific information, if yes some thing happen. I suppose that the email are stored in a data base o something l…
How to connect to my remote SQL server
I have a linux ubuntu server that I rent from DigitalOcean for storing streaming real time data in MySQL by coding with python. Problem is that I am coding not in the linux server environment but in my local computer python(personal Windows 10(not a server)). So in the coding, I need to connect to my linux se…
Use awk to create file
I have a file that contain : Mr Q 01629699998 Ms Nhung 011287633 … I would like to use this awk ‘{print “BEGIN:VCARD”;print “Name:”$0;print “TELEPHONE:”$0;print “END:VCARD”}’ file to create this result BEGIN:VCARD Name: Mr Q TELEPHONE:016296999…
How do you install .Net Core on Ubuntu without using sudo?
The current installation instructions for Ubuntu 14 require the use of sudo (https://www.microsoft.com/net/core#ubuntu). I don’t have root permissions on a particular Ubuntu 12 server that I need to install .Net Core on. I have tried to download the Ubuntu files (https://www.microsoft.com/net/download#c…
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 thi…