I’m trying to log in to a particular user on my lightsail account via ssh but I get a permission denied (public key) error Here are the steps I followed(I am on git bash on windows 8) ssh into my lightsail account via the .pem key provided via aws ssh -i <key.pem> ubuntu@<public_ip_address> …
Tag: linux
get user input in awk script and update it in file
I have a students.txt (RollNo, Name, IDU, CGPA), If Roll number exists prompt the user to change the IDU and CGPA and update the same in the file named “Student.txt” I made the following script: now I need help in taking user input for IDU and CGPA values and update the students.text file with that values aga…
How can I show only some words in a line using sed?
I’m trying to use sed to show only the 1st, 2nd, and 8th word in a line. The problem I have is that the words are random, and the amount of spaces between the words are also random… For example: Is there a way to get this to output as just the 1st, 2nd, and 8th words: Thanks for any
Running for loop terminal commands in Jupyter
I know how to run command line in Jupyter : using ! For example, run an image file 2.jpg on Python process.py Question is, how to process all files of a folder in iteration way (idx) in Jupyter cell, something like this: Thanks PS: I tried path , did not work: Answer A possible hackish solution could be to us…
How to separate data from large tsv file based on conditions and write on another file using Linux command
I have a tsv file named userid-timestamp-artid-artname-traid-traname.tsv of more than 2 GB of size with the following data Consider the first input line: Where first column is userid i.e. user_000022, second column is timestamp i.e. 2007-08-26T20:11:33Z, third column is artid i.e. ede96d89-515f-4b00-9635-2c5…
Containerized spring boot application with oracle database resetting connection
I am having a problem with a containerized spring boot application using oracle database. I successfully build my image but when I run it using docker the application gets stuck on getting a connection pool. The application runs with a connection reset exception and if I try to connect on it I get another con…
Pipe in ZSH is stripping colors from Git log output
I’m trying to utilize GRB’s git helpers (https://github.com/garybernhardt/dotfiles/blob/master/.githelpers) for pretty printing my git log. The git log –graph –pretty=”tformat:${LOG_FORMAT}” command from line #62 works just fine; printing with colors in iTerm. But as soon a…
why does pthread_cond_timedwait not trigger after indicated time-limit?
This is supposed to work in a loop (server) and delegate work/inquiry to a faulty library, here represented by the longrun() function call, to a thread with a time-out of tmax=3s. I placed synchronization vars and i am trying to wait for no more than this limit, but when longrun() hangs (run 4), it still wait…
Bash Read CSV value from Variable in Bash
So in a script I have a variable that changes each time the script is run. The variable is IP_PING. It is basically a list of if address seperated by commas. I want the script to take each ip addess in the csv variable and ping it. The example below works fine if I only have one ip address in
Assigning variable to a variable inside if statement
I am trying to assign a variable from a prompt input choice with no luck. If the user inputs 1, I want target_db_name = “database2”. My code: I have tried creating another if statement with no luck. Answer if $target_db = “1” then won’t work, because what follows if must be a com…