Trying to see how I can read the first line of a text file using jq I have a text file with a bunch of ids (newfile.txt ) id like to be able to just read the first line with jq. I tried doing this But getting an error of I’d like to be able to read line by line
Tag: linux
get multiple words after a specific word of HTML using linux/unix scripting
i have a file ‘movie.html’ : I want to get multiple word with pipe delimited like this: I tried this code: but the output isn’t as my expectation please help me, i am still a beginner Answer Parsing html with regex is not advised for several reasons (see https://stackoverflow.com/a/1732454/1…
run multiple commands in docker after container start
how can I run /bin/run1.sh and /bin/run2.sh after the container startup! also, if you can tell me how can I send the logs of /bin/run1.sh and /bin/run2.sh to container logs!! Docker file entrypoint.sh run1.sh run2.sh Answer You can change ENTRYPOINT [“entrypoint.sh”] to ENTRYPOINT [“entrypoi…
.Net Coe App in Linux fails with – ProjectFactory did not find Project
Following is my server environment Server : VPS Host : AWS EC2 OS : CentOS Linux 8.3.2011 Plesk : Plesk Obsidian 18.0.34 .Net Version : .Net Core 3.1.11 (Installed manually from linux CLI) What I am look for I have created a .Net core test application and tried to run the app using following and everything wo…
How to show hidden sysctl tunable?
I’m on a Yocto Linux distribution and I need to set the sysctl tunable kernel.panic_on_rcu_stall to 1. The problem is when I list the elements inside /proc/sys/kernel I have no panic_on_rcu_stall and if I try to set the option anyway I get the folowing error: I know that the key exist, we can see it on …
Can GNU Readline handle multiple streams?
I’m building a telnet application which uses GNU Readline to handle console input. Current implementation forks a new child for every new client connection – this assigns one readline instance for each child process. Fork-type network servers are not the most efficient, so I’d like to use po…
Filter output of git diff-tree based on file extension
gives me the list all the files that were committed for that SHA. I am looking for a way to get a list of files with only .xml or .html extensions. I checked the documentation page – here and couldn’t see any option. Any help is greatly appreciated. Answer You can use — <path> [<oth…
Renaming Sequentially Named Files with Date Embedded
The Situation: I have hundreds of zip files with an arbitrary date/time mixed into its name (4-6-2021 12-34-09 AM.zip). I need to get all of these files in order such that (0.zip, 1.zip 2.zip etc) with in a Linux cli system. What I’ve tried: I’ve tried ls -tr | while read i; do n=$((n+1)); mv R…
rpm.spec hide warning that comes after %post
I’m trying to solve this problem for a few days now but still nothing… Let’s say for example this is my upgrade.sh: And this is my rpm.spec file: Now I got example.rpm file. After I’m running the command rpm -U example.rpm this is the output I’m getting: Everything works fine wit…
How to get Puma and Nginx to run in Rails production?
Fighting for months with this, another new career path blooming every week, it seems, I look down. So, that said. Here’s the closest I’ve come. I had it working several times, but it’s so brittle as I’m more a developer than a devops (?) person. I am running Ubuntu 20.04. I can run pum…