Skip to content
Advertisement

Tag: bash

why my x64 process base address not start from 0x400000?

I learned from this link Why is address 0x400000 chosen as a start of text segment in x86_64 ABI? that 64-bit Linux process start address by default should be 0x400000, but on my Ubuntu, I only found my bash process starts from a very high base address (0x55971cea6000). Any one knows why? and how does dynamic linker choose the start

Install packages from a list through ansible

I have 2 servers named testserver and vsphere server. Ansible is installed on testserver and I have a list of packages stored in a text file packages.txt. How can I install those packages on vsphere server through ansible? This is my packages.txt file. I just have to fetch the package name from the packages.txt And this the yml file inside

grep all .js urls from text file

There is a File a.txt I want to grep all .js extension URLs so I tried this but it not showing https://site.tld/b.js?query=1 And when I tried this, It also select js name from anywhere Thanks in advance Answer Just escape the . with a

Difference between “${param[0]}” and ${1} in bash

I’m looking at some old scripts and I found some parameter assignment that I have not seen before. A while loop reads from a text file and passes the values to a function. The items in the text file look like this: the first stage of the function then looks like this: I have not seen this sort of assignment

ROS Noetic setup: /etc/ros/noetic/setup.bash not created

I am attempting to set up ROS noetic for Linux Mint 20. However, “sudo apt search ros-noetic” does not return anything. I ran the most similar package I could find, “ros-desktop-full,” and followed the rest of the wiki’s installation instructions from there, but can’t figure out how to finish environment setup, since /etc/ros/noetic/setup.bash was not created. sudo find / -name

How to populate json file with data from bash variable

I am writing a small bash script and I am stuck. I have a text file with some information and I stored the contents of that file in a bash variable. My tools.txt file looks like this: And so on. What I want is to dynamically create a JSON file named tools.json and to populate that file with the content

how to extract part of log file bash [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 11 months ago. The community reviewed whether to reopen this question 10 months ago and left it closed: Original close reason(s) were not resolved Improve this question I have a log

aws cli describe cluster error using ‘for loop’

I’m having trouble trying to run a for loop with the aws cli command aws eks describe-cluster. I receive the below error on execution. My scripting is not the best. Any help would be greatly appreciated. Thanks. If I simply run aws eks list-clusters | grep dev-shark it outputs the below: It seems to be the comma (,) that is

If condition met, yet doesn’t run in Bash script

Sorry if a silly question. I have a script that doesn’t behave how it’s intended even though a condition is met. My script is something like this: I’ve tried declaring the state variable in different ways but non seem to work; also tried [ $output = $state ] [ “$output” = “$state” ] [[ ]] but nothing works. I think

Advertisement