I am trying to create an assembly program that takes a user input hexadecimal number no greater than 4 digits and outputs the same number in base 10. This is being done using NASM on a Linux install. Using some tutorials I’ve found and my very limited understanding of this language, I have come up with …
Getting unexpected newline error while doing awk
I am running the following script in linux command line: I am getting the following error: I believe the quotes and spaces are consistent, but why am i still getting this error? Output of ps -ef | grep “java -Droute=full” Answer The actual problem you’re trying to solve is something like …
Multiple bash commands in background
I am trying to execute multiple single line commands in the background from php exec(). My script watermarks the video and deletes the original video and rename the watermarked video to the original name. I want to run the whole code in the background. I have tried both round () and curly {} braces but failed…
search numbers with egrep and regular expression
Given a file file1 with this text: I want to use egrep to search all the numbers that start with 5 and end with 1. I have tried: Answer This regex will work Regex Breakdown
Wget over SSL gives: Unable to establish SSL connection [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
How to create a script in Linux that makes a pyramid of asterisks with the pattern 1, 3, 5, 7, 9, 11, 13, 15, 17 centered
I’m trying to write a shell script to print a pyramid of asterisks like this: Below is my attempt so far. When I run it, I get some errors that say arithmetic expression required. What am I doing wrong? Answer The syntax of an arithmetic for-loop uses two semicolons, not a semicolon and a comma: (The in…
Embedded Python3 raise an exception when importing a local module
I’m trying to embed a Pyhton3 program into a C++ one. After following several tutorials and blog posts I get the following code, which fails: The result is the following: So, importing sys works but importing my own module fails, while adding the path to my modules seemed to work. Any idea ? Answer Repl…
How to see errors from an ionic app from my device
Fellows I have made an app by using ionic framework. When I run On the terminal it runs as it should be. But when I run it via: I see on the device the app running by displaying the ionic’s loading screen, but after that it does not run as it should be. What I am asking is how can
How can I compile GCC with a shared library?
I create shared library libpl.so. I use this command to create connections: And now I try to compile my program using: but I have errors: What should I do to fix it? How can I compile it? Answer The line works correctly. Compile with: Run with:
Optimal way of writing to append-only files on an SSD
I want to know what’s the optimal way to log to an SSD. Think of something like a database log, where you’re writing append-only, but you also have to fsync() every transaction or few transactions to ensure application level data durability. I’m going to give some background on how SSDs work…