Skip to content

Tag: bash

Renaming JSON files based on their contents

I have loads of geographical json files with date_geohash.json name format and I have to convert them to date_latitude-longotude.json format. For example I need to convert 2017-03-28_u13hhyn.json to 2017-03-28_N52.76-E1.62.json.   I’m trying to write a bash script to rename these json files using &#8216…

How do run executable c++ through terminal in debug mode?

I have a c++ executable file named test .. To execute it in my terminal I run….. Although I want to run it in debug mode wherein it shows the exact command being used immediately after being executed If you are wondering what exactly I mean by debug mode.. Just like how we use -x for shell scripts This …

Doing an awk command for a conditional statement

I’m doing a bash script using the Awk command to format a file with some user info, and at the beginning of the script, I want it to say “if the value in column 1 is not in the format abc123, skip that line. It doesn’t seem to be working though. I had this previously: but of course that woul…