I found a cool trick using 7zip, to extract a file from an archive, and output it to a custom filename.
I do data processing, and for one particular client, there are multiple file layouts, but basically get named either templatea.txt or templateb.txt. The data comes in as a gzipped file with a very long name. I unzip the file and rename it to either templatea.txt or templateb.txt. I decided to see if I could extract the file and rename it in one step. The first google result, superuser.com/questions/558396/aut... , gave me the answer I was looking for.
For my case, at least, the command ends up being:
7z e *.gz -so > templatea.txt
The 'e' is for extract, '-so' indicates that it should be redirected to standard out, and then I redirect it with '> templatea.txt' into the appropriate file name.
I will probably make this a batch script for now, as I have several small batch scripts like this.
I've started learning React Hooks today. In the beginning of the week started NodeJs. And doin side project
Hooks are awesome! I've been working with them for the past month or so and I've really enjoyed working with them so far. I'll be posting a step-by-step tutorial about building custom hooks next week, so feel free to keep an eye out for it.
I'll love it, because I'm trying to build custom hooks. Waitin 4 it)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.