Блог пользователя Maxim

How to Change the Default Shell to Bash on Mac OS X Catalina

Mac OS X Catalina uses by default zsh.

You can change the default shell to Bash by running the following command:chsh -s /bin/bash

If you want to back to zsh use following command:chsh -s /bin/zsh

To get list of all included shells you can use command below: <\p>cat /etc/shells

The original article you can find here

How to collect all Android device ids in bash script

Hello everyone!

Today I'm going on to share bash script with you, which will help you to collect all android devices id.

deviceList=""
for line in `adb devices | grep -v "List" | awk '{print $1}'`
do
  device=`echo $line | awk '{print $1}'`
  echo "$device"
  if [ $deviceList != "" ]; then
    deviceList="$deviceList,"
  fi
  deviceList="$devicList$device"
done
echo $deviceList

This approach you can use to capture any data from any output.

Have a good day!

Enjoy!

 

How to enable Screen Sharing on Macs via Terminal

Follow these steps to enable Screen Sharing via Terminal.

1. Navigate to Applications | Utilities and launch Terminal. If you're working from a keyboard only, press Command+Space Bar to launch Spotlight, and then enter Terminal in the search box to launch the app.

How to keep processes running after ending ssh session?

Hi everyone!

Sometimes due some reasons we need to launch any process via ssh and keep it running after ending the ssh session.

The following instruction helps you to save your time.

Connect to certain machine via ssh

ssh username@ip_address

If you use ubuntu then make sure screen is already installed on the machine you need keep any process running after endind ssh session.
Run 

screen -v

How to instal Homebrew (brew) on Mac OS X

Homebrew. Homebrew is a package manager for the Mac — it makes installing most open source sofware (like Node) as simple as writing brew install node. You can learn more about Homebrew at the Homebrew website. To install Homebrew just open Terminal and type ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" You’ll see messages in the Terminal explaining what you need to do to complete the installation process.

Страницы