<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Shell on myByways</title><link>https://myByways.com/tags/shell/</link><description>Recent content in Shell on myByways</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 17 Jul 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://myByways.com/tags/shell/index.xml" rel="self" type="application/rss+xml"/><item><title>Running Steam in Game Porting Toolkit</title><link>https://myByways.com/post/running-steam-in-game-porting-toolkit/</link><pubDate>Wed, 14 Jun 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/running-steam-in-game-porting-toolkit/</guid><description>&lt;p&gt;In &lt;a href="https://myByways.com/post/apple-game-porting-toolkit-with-whisky"&gt;my previous post&lt;/a&gt;, I managed to get &lt;a href="https://github.com/IsaacMarovitz/Whisky" rel="external"&gt;Whisky&lt;/a&gt;, with Apple’s &lt;strong&gt;Game Porting Toolkit&lt;/strong&gt;, working on macOS Ventura without Homebrew. Here I manage to get &lt;a href="https://store.steampowered.com/about/" rel="external"&gt;Steam&lt;/a&gt; running after jumping through hoops.&lt;/p&gt;</description></item><item><title>Run code in a macOS Sandbox</title><link>https://myByways.com/post/run-code-in-a-macos-sandbox/</link><pubDate>Sun, 11 Jun 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/run-code-in-a-macos-sandbox/</guid><description>&lt;p&gt;I sometimes test randomly downloaded code on macOS in a &lt;strong&gt;Sandbox&lt;/strong&gt; that has limited and network access. I posted about this way back in Jan 2017, &lt;a href="https://myByways.com/post/creating-a-macos-sandbox-to-run-kodi"&gt;Creating a macOS Sandbox to run Kodi&lt;/a&gt;, and this is a short refresher for me&amp;hellip;&lt;/p&gt;</description></item><item><title>File Date Created = Photo / video metadata</title><link>https://myByways.com/post/file-date-created-to-photo-video-metadata/</link><pubDate>Sun, 04 Jun 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/file-date-created-to-photo-video-metadata/</guid><description>&lt;p&gt;When I export photos or videos from &lt;strong&gt;Photos.app&lt;/strong&gt;, I want the file’s &lt;strong&gt;Created Date&lt;/strong&gt; (&lt;strong&gt;Created Date&lt;/strong&gt; in Finder) to be the time the photo or video was taken. Alas, this is not the way Photos works, and setting the date turned out to be more challenging than expected.&lt;/p&gt;</description></item><item><title>“Delete” (Move) to Trash in macOS Shell</title><link>https://myByways.com/post/delete-move-to-trash-in-macos-shell/</link><pubDate>Mon, 08 May 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/delete-move-to-trash-in-macos-shell/</guid><description>&lt;p&gt;A short one today: here is a function to “delete” (read: move) a file to the macOS &lt;strong&gt;Trash&lt;/strong&gt; (Bin), as a safer alternative to &lt;code&gt;rm&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Enabling the macOS Metal Performance HUD</title><link>https://myByways.com/post/enabling-the-macos-metal-performance-hud/</link><pubDate>Fri, 28 Apr 2023 00:00:00 +0000</pubDate><guid>https://myByways.com/post/enabling-the-macos-metal-performance-hud/</guid><description>&lt;p&gt;Did you know that macOS has a built-in game performance HUD with a frames per second (FPS) counter, similar using &lt;a href="https://myByways.com/post/cpu-and-gpu-monitoring-overlay-for-gaming"&gt;RivaTuner Statistics Server (RTSS)&lt;/a&gt; to display a GPU performance overlay in Windows? Here’s how to enable the &lt;a href="https://developer.apple.com/metal/" rel="external"&gt;Metal Performance HUD&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Script to re-map MacBook Pro function keys</title><link>https://myByways.com/post/script-to-re-map-macbook-pro-function-keys/</link><pubDate>Sun, 19 Jun 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/script-to-re-map-macbook-pro-function-keys/</guid><description>&lt;p&gt;In &lt;a href="https://myByways.com/post/remapping-physical-function-keys-on-macbook-pros"&gt;my last post, “Re-mapping physical function keys on MacBook Pros”&lt;/a&gt; I used the &lt;code&gt;hidutil&lt;/code&gt; tool to re-map the function keys on a Mac without a touchbar. I’ve since created a script to more easily apply changes.&lt;/p&gt;</description></item><item><title>Re-mapping physical function keys on MacBook Pros</title><link>https://myByways.com/post/remapping-physical-function-keys-on-macbook-pros/</link><pubDate>Wed, 15 Jun 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/remapping-physical-function-keys-on-macbook-pros/</guid><description>&lt;p&gt;One common ask from &lt;strong&gt;M1&lt;/strong&gt; (Apple Silicon / ARM) &lt;strong&gt;MacBook Pro&lt;/strong&gt; users is to be able to re-define what the top row of physical function keys do, for example, to change the &lt;kbd&gt;Dictation (F5)&lt;/kbd&gt; key to decrease the keyboard backlight brightness and &lt;kbd&gt;DND (F6)&lt;/kbd&gt; to increase it, similar to other Macs. Here’s how to do that&amp;hellip; and more!&lt;/p&gt;</description></item><item><title>Multipass for Docker containers on macOS</title><link>https://myByways.com/post/multipass-for-docker-containers-on-macos/</link><pubDate>Thu, 17 Mar 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/multipass-for-docker-containers-on-macos/</guid><description>&lt;p&gt;I previously setup &lt;a href="https://myByways.com/post/minuscule-lima-setup-to-replace-docker-on-macos"&gt;Lima as a replacement for Docker Desktop&lt;/a&gt; on macOS. A while ago I tried &lt;a href="https://multipass.run/" rel="external"&gt;Multipass&lt;/a&gt; by Canonical, which makes it really easy to spin up a Ubuntu VM (using Hyperkit) without all the setup and installation typically required with Virtual Box or QEMU.&lt;/p&gt;</description></item><item><title>Viewing man pages in Preview or VS Code</title><link>https://myByways.com/post/viewing-man-pages-in-preview-or-vs-code/</link><pubDate>Mon, 06 Sep 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/viewing-man-pages-in-preview-or-vs-code/</guid><description>&lt;p&gt;I stumbled upon a post entitled &lt;a href="https://ericasadun.com/2021/08/19/piping-stdout-and-stderr-to-preview/" rel="external"&gt;“Piping stdout and stderr to Preview” by Erica Sadun&lt;/a&gt; - the cool bit that caught my attention was about redirecting &lt;code&gt;man&lt;/code&gt; pages (UNIX help) to Preview on macOS. But this got me thinking&amp;hellip; to redirect the output to &lt;a href="https://code.visualstudio.com/" rel="external"&gt;Visual Studio Code&lt;/a&gt; instead!&lt;/p&gt;</description></item><item><title>Extracting embedded ZIPs from Office documents</title><link>https://myByways.com/post/extracting-embedded-zips-from-office-documents/</link><pubDate>Tue, 10 Aug 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/extracting-embedded-zips-from-office-documents/</guid><description>&lt;p&gt;I have a plethora of &lt;strong&gt;Bash&lt;/strong&gt; scripts littered throughout my filesystem, many written for one specific purpose and promptly forgotten about (often, just named &lt;code&gt;go.sh&lt;/code&gt;!) I thought I share one today - a script to extract embedded ZIP files from Microsoft Office documents created in Windows.&lt;/p&gt;</description></item><item><title>Shell script to move duplicate files</title><link>https://myByways.com/post/shell-script-to-move-duplicate-files/</link><pubDate>Fri, 09 Jul 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/shell-script-to-move-duplicate-files/</guid><description>&lt;p&gt;I setup &lt;strong&gt;Firefox&lt;/strong&gt; on macOS to automatically download files to my “Downloads” folder without prompting (under &lt;kbd&gt;Preferences&amp;hellip;&lt;/kbd&gt; &amp;gt; &lt;kbd&gt;Downloads&lt;/kbd&gt;, and select &lt;strong&gt;Save files to&amp;hellip;&lt;/strong&gt; instead of &lt;strong&gt;Always ask you where to save files&lt;/strong&gt;). If there is an existing file with the same name, Firefox appends &lt;code&gt;(1)&lt;/code&gt; to the filename (then &lt;code&gt;(2)&lt;/code&gt;, &lt;code&gt;(3)&lt;/code&gt; and so on). Over time, I land up with files with similar file names, which may or may not be identical. This shell script finds and moves duplicate files to a different folder&amp;hellip; for subsequent manual deletion.&lt;/p&gt;</description></item><item><title>Migrating from bash shell scripts to Python</title><link>https://myByways.com/post/migrating-from-bash-shell-scripts-to-python/</link><pubDate>Thu, 11 Mar 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/migrating-from-bash-shell-scripts-to-python/</guid><description>&lt;p&gt;I recently wanted to migrate from a &lt;strong&gt;Bash 3&lt;/strong&gt; shell script to &lt;strong&gt;Python 3&lt;/strong&gt;. This is nothing but a brain dump comparing a few bits and bobs.&lt;/p&gt;</description></item><item><title>Custom icons in Windows Start Menu Medium Tiles</title><link>https://myByways.com/post/custom-icons-in-windows-start-menu-medium-tiles/</link><pubDate>Thu, 21 Jan 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/custom-icons-in-windows-start-menu-medium-tiles/</guid><description>&lt;p&gt;In the Windows 10 &lt;strong&gt;Start Menu&lt;/strong&gt;, I used &lt;strong&gt;Pin To Start&lt;/strong&gt; to a medium sized tile for Firefox - and the icon is nice and large - but is not the case for other shortcuts. I was wondered why&amp;hellip; and how to make all the icons have a more consistent look.&lt;/p&gt;</description></item><item><title>macOS zsh configuration</title><link>https://myByways.com/post/macos-zsh-configuration/</link><pubDate>Thu, 07 May 2020 00:00:00 +0000</pubDate><guid>https://myByways.com/post/macos-zsh-configuration/</guid><description>&lt;p&gt;From &lt;strong&gt;macOS Catalina 10.5&lt;/strong&gt; onwards, &lt;code&gt;zsh&lt;/code&gt; is the default shell, instead of &lt;code&gt;bash&lt;/code&gt;. I have a lot to learn about this shell, and so far, this is how I configured &lt;a href="http://zsh.sourceforge.net/" rel="external"&gt;zsh&lt;/a&gt;&amp;hellip; There is an overload of snippets on-line, but I’ve not seen a post doing what I do, so hopefully this helps someone!&lt;/p&gt;</description></item><item><title>OCRmyPDF: searchable text from images</title><link>https://myByways.com/post/ocrmypdf-searchable-text-from-images/</link><pubDate>Mon, 16 Dec 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/ocrmypdf-searchable-text-from-images/</guid><description>&lt;p&gt;I recently had a bunch of screen shots that I wanted to OCR, so that I could search for text content in the future. I found an open source solution called &lt;a href="https://github.com/jbarlow83/OCRmyPDF" rel="external"&gt;OCRmyPDF&lt;/a&gt; (created by &lt;strong&gt;jbarlow83&lt;/strong&gt; over on GitHub) to be very simple to use. It’s also &lt;a href="http://ocrmypdf.readthedocs.io/" rel="external"&gt;very well documented&lt;/a&gt; with many usage examples, including my preferred option - from a &lt;a href="https://www.docker.com" rel="external"&gt;Docker&lt;/a&gt; container.&lt;/p&gt;</description></item><item><title>Touch Bar Quick Action Scripts</title><link>https://myByways.com/post/touch-bar-quick-action-scripts/</link><pubDate>Wed, 18 Sep 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/touch-bar-quick-action-scripts/</guid><description>&lt;p&gt;Just sharing some &lt;strong&gt;Automator&lt;/strong&gt; scripts I use for &lt;strong&gt;Touch Bar Quick Actions&lt;/strong&gt; showcasing three different methods - using pre-defined &lt;strong&gt;Actions&lt;/strong&gt;, using &lt;strong&gt;AppleScripts&lt;/strong&gt; and using &lt;strong&gt;Shell&lt;/strong&gt; scripts.&lt;/p&gt;</description></item><item><title>Three Ways to Quickly Toggle Dark Mode</title><link>https://myByways.com/post/three-ways-to-quickly-toggle-dark-mode/</link><pubDate>Sun, 04 Aug 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/three-ways-to-quickly-toggle-dark-mode/</guid><description>&lt;p&gt;Here’s are a few short tips - to toggle &lt;strong&gt;Dark Mode&lt;/strong&gt; on macOS without opening &lt;strong&gt;System Preferences&lt;/strong&gt;. Useful when designing your &lt;a href="https://myByways.com/post/dark-mode-with-prefers-color-sheme-media-query"&gt;Dark Mode enabled web site using &lt;code&gt;prefers-color-sheme&lt;/code&gt; &lt;strong&gt;Media Query&lt;/strong&gt;, like I did&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Building and packaging Wine 4.12.1 (32-bit and 64-bit) automatically</title><link>https://myByways.com/post/building-and-packaging-wine-4-12-1-32-bit-and-64-bit-automatically/</link><pubDate>Wed, 31 Jul 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/building-and-packaging-wine-4-12-1-32-bit-and-64-bit-automatically/</guid><description>&lt;p&gt;For a while now, I’ve been posting about compiling &lt;a href="https://www.winehq.org/" rel="external"&gt;Wine&lt;/a&gt; on macOS, starting with &lt;a href="https://myByways.com/post/compiling-wine-from-scratch-on-macos-with-retina-mode"&gt;Wine 1.9 in October 2016&lt;/a&gt;, then automating the compile for &lt;a href="https://myByways.com/post/automated-script-to-compile-wine-2-9-from-scratch"&gt;Wine 2.9 32-bit in May 2017&lt;/a&gt;. Now it’s July 2019, and this is probably my last post on the subject - a fully automated script to download and compile Wine 4.12.1 (released 7 July 2019) 32-bit and 64-bit on macOS.&lt;/p&gt;</description></item><item><title>A bash script to search a CSV file</title><link>https://myByways.com/post/bash_script_to_search_csv_file/</link><pubDate>Sat, 19 May 2018 00:00:00 +0000</pubDate><guid>https://myByways.com/post/bash_script_to_search_csv_file/</guid><description>&lt;p&gt;I sometimes need to search a huge CSV file (13 MB), containing 21,000 rows and roundabout 40 columns, which &lt;strong&gt;Numbers&lt;/strong&gt; takes half a minute to open. All I need to do is search and display the results of a few columns only&amp;hellip; so I wrote a &lt;strong&gt;bash&lt;/strong&gt; script to do this for me - and I was quite specific in that I wanted the results in &lt;strong&gt;color!&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Using an exFAT drive for Time Machine backups</title><link>https://myByways.com/post/using-an-exfat-drive-for-time-machine-backups/</link><pubDate>Thu, 22 Mar 2018 00:00:00 +0000</pubDate><guid>https://myByways.com/post/using-an-exfat-drive-for-time-machine-backups/</guid><description>&lt;p&gt;I got a new 2 TB external disk - &lt;em&gt;&amp;ldquo;yay&amp;rdquo;&lt;/em&gt; - and wanted to use it for both on my Windows desktop and for &lt;strong&gt;Time Machine&lt;/strong&gt; backups. Immediately thought to format it as &lt;a href="https://en.wikipedia.org/wiki/ExFAT" rel="external"&gt;exFAT&lt;/a&gt; but quickly came to realize Time Machine does not support exFAT! Fortunately, there is a workaround&amp;hellip;&lt;/p&gt;</description></item><item><title>Converting JSON into CSV</title><link>https://myByways.com/post/converting-json-into-csv/</link><pubDate>Fri, 29 Dec 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/converting-json-into-csv/</guid><description>&lt;p&gt;Recently I needed to analyze some JSON data. Now, I&amp;rsquo;m no data scientist, so I wanted to convert my JSON data to comma separated (CSV) and &amp;ldquo;flatten&amp;rdquo; the data&amp;hellip; just so I could use the data in &lt;strong&gt;Excel&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And Merry Christmas and Happy New Year!&lt;/p&gt;</description></item><item><title>Fixing PowerPoint TIFF images and fonts</title><link>https://myByways.com/post/fixing-powerpoint-tiff-images-and-fonts/</link><pubDate>Fri, 25 Aug 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/fixing-powerpoint-tiff-images-and-fonts/</guid><description>&lt;p&gt;&lt;strong&gt;Microsoft PowerPoint 2016 for Mac&lt;/strong&gt; (aka version 15) has a strange quirk - when I copy and paste images from &lt;strong&gt;Preview&lt;/strong&gt; or most other applications, the image gets copied in &lt;a href="https://en.wikipedia.org/wiki/TIFF" rel="external"&gt;Tagged Image File Format (TIFF)&lt;/a&gt;. The image is practically uncompressed (or possibly minimally compressed), resulting in very, very huge PPTX files! &lt;strong&gt;Plus:&lt;/strong&gt; Removing unwanted font references.&lt;/p&gt;</description></item><item><title>Text Manipulation Cheat Sheet</title><link>https://myByways.com/post/text-manipulation-cheat-sheet/</link><pubDate>Mon, 26 Jun 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/text-manipulation-cheat-sheet/</guid><description>&lt;p&gt;I recently had the &amp;ldquo;opportunity&amp;rdquo; to perform some text manipulation to get data from a huge log file into a spreadsheet. I had done this sort of work a long time ago as a developer, but had forgotten over the years. So I decided to compile a &lt;strong&gt;text manipulation cheat-sheet&lt;/strong&gt; for macOS.&lt;/p&gt;</description></item><item><title>Automated script to compile Wine 2.9 from scratch</title><link>https://myByways.com/post/automated-script-to-compile-wine-2-9-from-scratch/</link><pubDate>Sun, 28 May 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/automated-script-to-compile-wine-2-9-from-scratch/</guid><description>&lt;p&gt;Following up on my posts, &lt;a href="https://myByways.com/post/compiling-wine-from-scratch-on-macos-with-retina-mode"&gt;Compiling Wine 1.9 from scratch on macOS with Retina mode&lt;/a&gt; and &lt;a href="https://myByways.com/post/creating-a-wine-app-bundle-manually"&gt;Creating a wine.app bundle manually&lt;/a&gt;, here&amp;rsquo;s my script to automatically download and compile pre-requisite libraries, then download and compile &lt;strong&gt;Wine 2.9 32-bit&lt;/strong&gt;, build the &lt;strong&gt;.app&lt;/strong&gt; bundle, and even include a registry tweak to enable &lt;strong&gt;Retina Mode&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Verifying downloads with a SHA-256 checksum</title><link>https://myByways.com/post/verifying-downloads-with-a-sha-256-checksum/</link><pubDate>Wed, 24 May 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/verifying-downloads-with-a-sha-256-checksum/</guid><description>&lt;p&gt;I recently downloaded an update to &lt;a href="http://www.videolan.org/" rel="external"&gt;VLC&lt;/a&gt;, an open-source media player. The VLC download page, displayed it&amp;rsquo;s &lt;strong&gt;SHA-256&lt;/strong&gt; checksum - here&amp;rsquo;s how to quickly validate your download by comparing the checksum using the built-in macOS tools.&lt;/p&gt;</description></item><item><title>Extract files from a macOS installer .pkg</title><link>https://myByways.com/post/extract-files-from-a-macos-installer-pkg/</link><pubDate>Sun, 06 Nov 2016 00:00:00 +0000</pubDate><guid>https://myByways.com/post/extract-files-from-a-macos-installer-pkg/</guid><description>&lt;p&gt;Want to extract files from a macOS installer package with a &lt;code&gt;.pkg&lt;/code&gt; extension?&lt;/p&gt;</description></item><item><title>Finding application files in OS X</title><link>https://myByways.com/post/finding-application-files-in-osx/</link><pubDate>Wed, 15 Jun 2016 00:00:00 +0000</pubDate><guid>https://myByways.com/post/finding-application-files-in-osx/</guid><description>&lt;p&gt;Apps, even after being removed from the &lt;strong&gt;Launchpad&lt;/strong&gt; or &lt;strong&gt;Applications&lt;/strong&gt; sidebar in &lt;strong&gt;Finder&lt;/strong&gt;, do leave preferences and other files scattered around. Where are they, typically, and how does one find them?&lt;/p&gt;</description></item><item><title>OS X Terminal color prompt</title><link>https://myByways.com/post/os-x-terminal-color-prompt/</link><pubDate>Thu, 28 Apr 2016 00:00:00 +0000</pubDate><guid>https://myByways.com/post/os-x-terminal-color-prompt/</guid><description>&lt;p&gt;My previous &lt;a href="http://mybyways.com/blog/osx-terminal-tweaks" rel="external"&gt;Terminal Tweaks post&lt;/a&gt; had an incorrect prompt (PS1) setting, that caused lines to wrap on themselves! This is now corrected, with more details on the color options&amp;hellip;&lt;/p&gt;</description></item><item><title>Screen capture script for retina display with PNG optimization</title><link>https://myByways.com/post/screen-capture-script-for-retina-display-with-png-optimization/</link><pubDate>Mon, 19 Oct 2015 00:00:00 +0000</pubDate><guid>https://myByways.com/post/screen-capture-script-for-retina-display-with-png-optimization/</guid><description>&lt;p&gt;Forget the complex or manual steps, or costly tools to get screen shots scaled down from a retina display. I have a &lt;strong&gt;shell script&lt;/strong&gt; that triggers an interactive window screen capture, saves the screen shot (assumed to be 2x retina display), re-sizes it to 1x and compresses the PNG further! Best of all, it does not require paid software or Automator.&lt;/p&gt;</description></item><item><title>OS X Terminal Tweaks</title><link>https://myByways.com/post/osx-terminal-tweaks/</link><pubDate>Fri, 16 Oct 2015 00:00:00 +0000</pubDate><guid>https://myByways.com/post/osx-terminal-tweaks/</guid><description>&lt;p&gt;Some tweaks to my OS X shell (&lt;kbd&gt;Terminal&lt;/kbd&gt;.app) that I&amp;rsquo;ve found useful.&lt;/p&gt;</description></item></channel></rss>