I have 20 files like: Files have a similar format in their names. They begin with 01, and they have 01*AAA*.sh format. I wish to copy and rename files in the same directory, changing the number 01 to 02, 03, 04, and 05: I wish to copy 20 of 01*.sh files to 02*.sh, 03*.sh, and 04*.sh. This will make the
Tag: linux
Why does this nostdlib C++ code segfault when I call a function with a thread local variable? But not with a global var or when I access members?
Assembly included. This weekend I tried to get my own small library running without any C libs and the thread local stuff is giving me problems. Below you can see I created a struct called Try1 (because it’s my first attempt!) If I set the thread local variable and use it, the code seems to execute fine. If I call
Why libtool runs ranlib for a static library installation?
I’m trying to understand why libtool runs ranlib when installing a static library. This is an example from the link: https://www.gnu.org/software/libtool/manual/html_node/Installing-libraries.html But, isn’t the index table already created and shouldn’t it be just a simple copy operation? I found running ranlib at the end of the copy redundant as the library already has an index. Thanks. Answer Back in the
Linux Shell Script – Mounting and Backing Up Files
I’m writing my first shell script. I want to check if a filesystem is mounted. If so, then backup the documents from my main drive to the backup that is mounted. If not, mount the filesystem, then backup the documents. I executed the script, yet all I got was a lot of text. It didn’t perform as I wanted. Did
Ctrl+backtick not working in Linux based terminals [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 Exchange site, you can leave a comment to explain where the question
Azure Machine Learning installing chromedriver on a pipeline
I m trying to run my python script (which uses chromedriver) on a pipeline to be able to call it from Azure Data Factory. when i run the pipeline, i am getting error of chromedriver isn’t at path. The script works fine with my local environment. I also tried to install chromedriver according to below code in my python script.
Azure Linux Web App Service – System.IO.IOException: Readonly File Error
The web app already running on .NET Core 3.1 LTS with IIS (windows server 2019) Recently, I deployed as an Azure Web App Service but I encountered a file write error. The application trying to create a new file for some business requirement. Error message; System.IO.IOException: Read-only file system Has anyone encountered this problem on Azure Linux Web App? Solved:
Linux count files with a specific string at a specific position in filename
I have a directory which contains data for several years and several months. Filenames have the format yy/mm/dd, f.e. 20150415, 20170831, 20121205 How can I find all data with month = 3? F.e. 20150302, 20160331, 20190315 Thanks for your help! Answer A question mark is a wildcard which stands for one character, so as your format seems to be YYYYmmDD,
Looping over the last subdirectory to zip in linux terminal
given the following structure: How do I find & zip the last subdirectory in specific directories? The directory starts with ‘b’ (ex) ‘b1’, ‘b2’ Find the last subdirectory and zip it (ex) ‘b14’, ‘b22’ I want something like: The output has to be: Answer Pipe to tail -1 to get the last line.
Compiler cannot find header file within header file in C++
I have a header file provided by yaml-cpp library, yaml.h yaml.h: main.cpp All the header files are in the same directory (/home/user/application/libs/yaml-cpp/include), but the compiler is unable to find parser.h and all the other includes. Why is this so and how do I fix it? I have tried using g++ -I/home/user/application/libs/yaml-cpp/include main.cpp but that did not work. I am on