I didn’t know that tool existed I will give fzf a try!
- Posts
- 5
- Comments
- 96
- Joined
- 3 yr. ago
- Posts
- 5
- Comments
- 96
- Joined
- 3 yr. ago
I agree, and I’d like to be there as well so that I can easily read and understand a man page.
- Agree. Always was too strong a statement. I’ll edit my post to reflect that.
- Thank you! I’m going to read up on string manipulation
- True. This has been working for me because I know enough of the directories I’m looking for to insure a single match, but not the necessarily the exact, specific directory name.
That’s fair. Always was probably too strong.
To insure the script works on the files you want it to work on.
If you use a relative path in a script (is relative the right word?), with something like:
mv *.txt /place/to/move/to/The script will act on the files in the current working directory, which may not be the files you intend for the script to act on.
If you put the absolute path to where the files reside in the filesystem, then you can run the script from any location, and know that it will act on the files in the specified directory.
Maybe always is too strong a statement. For the scripts I was working on, it was a learning moment when I ran the script without the full path and the script errored out because the files were not in the working (home) directory. (I had ssh’d into the machine to run the script)
You’re welcome! I stumbled across Multipass when I was looking for virtual machine options for the m1 mac mini I’m working on. I specifically was trying to get away from using the mac coreutils for a consistent syntax experience, and Multipass has been working perfectly for that.
It was only after I’d been using Multipass already that I stumbled across that script, and planned to take a look at it to possibly implement on my machine. I didn’t realize that Homebrew allowed for replacing the coreutils with the GNU versions. Another thing learned!
Yes, thank you! The man pages have been a huge help as I’m working through things. Sometimes I don’t know enough to understand what the man pages are telling me, and then I usually end up on stack exchange looking at a command example that someone has helpfully broken down.
Nice. I haven’t seen that one before!
Obligatory xkcd
My initial goal (before learning what a headache rar is) was to preserve the original file format. Now my plan is to convert them. I have to confer with my friend to see what format they’d prefer for the files. Probably end up using regular old zip.
This sounds interesting. I’m gonna look into it. Thank you!
Haha. Definitely last resort. Having learned what a pain rar is due to its propriety nature, I’m going to see if they care if I convert them to tar or zip first.
I do have unrar installed, but I’m not able to modify in place or add new files to the archive with it, which is the functionality I’m missing.
Unrar isn’t the problem though. I’ve already installled unrar to read the file in the rar I need to modify.
What I was looking for is rar so that I can modify the text in the file and update the rar archive.
No idea. I didn’t choose rar. These are archives that I have to deal with.
I’m doing a favor for a friend, and the files were given to me as rar archives. Obviously my first mistake was offering to help, though the reason I offered is because I’m learning scripting and regex. It’s a good challenge for me, and I’m learning stuff I didn’t know, so goal accomplished for me. Also none of this is paid or business/work related stuff. Just helping a friend out.
Anyway, now that I’ve learned that rar is proprietary, I’m gonna see if they care if I convert them all to zip or tar. The scripting to convert them will be another good challenge and will avoid this rar problem.
Hahahaha
Thank you!! I will try that!!
I’ve got unrar installed already, but what I want to be able to do is add/update files in the rar archives, which unrar can’t do.
I’ve dabbled with Linux here annd there since 1999 when I installed Caldera Open Linux 2.2 on a pos desktop I had at the time.
Caldera ran pretty well on that machine for about six months, until the machine up and died. IIRC, the motherboard fried.
My next foray was around 2007ish when I had a dell laptop that was struggling to run windows. I was also interested in tinkering, so I installed Ubuntu for the first time. I think it was Hardy Heron (8.04).
I ran that for a good year or so, until the charging port on the laptop took a shit, but I didn’t really get deep into Linux. I just used it for general computing.
My next computer was a MacBook Pro 2009 13”. This began a long relationship with Macs and macOS that continues to this day, though I am far less enamored of Apple and macOS now than I was in the past.
What was great about Macs and osx/macos over that period was that by and large it did what Apple promised. It just worked. The hardware was powerful and reliable, and the software let me get my work done (photo and video production), and so I had no desire to use anything else.
During this time period I also built a windows pc dedicated to live streaming as part of my production work, which is relevant, because about four years ago, right before the pandemic hit, I quit photo and video production.
So I had this pc sitting around, and I once again decided it was time to give Linux a spin, and now I’m all in. For three years running, that pc has been my home server running Ubuntu (just updated it to 22.04). With that server I’ve really been learning about Linux, and it’s been a lot of fun.
I’d love to put Asahi on the m1 Mac mini that is our main household computer, but my wife wouldn’t be too happy with me if I did that, so I’m still using macOS. I spend a lot of time at the terminal, often working on the server over ssh, but also just working with my files locally.
Since macOS is bsd based I’ve run across a number of cli tools that work just different enough from their Linux counterparts. I found that frustrating and confusing, and decided I wanted consistency in my cli tools. Since I can’t install Asahi, I found Multipass and installed that on the Mac mini. So now I have an Ubuntu vm with my pertinent local drives mounted to give me a consistent experience with shell whether I’m working on the server or working on the Mac.
That’s a super useful way to remember. Thank you!