How can I run those commands on my Terminal?

==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
    (echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/star/.zprofile
    eval "$(/usr/local/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

star@stars-iMac ~ % 


How to Run thesse two commands on my Terminal or what exactly to type in ?


[Re-titled by Moderator]

Posted on Sep 30, 2023 12:28 PM

Reply
12 replies

Sep 30, 2023 12:54 PM in response to garage4996

garage4996 wrote:

How to Run thesse two commands on my Terminal or what exactly to type in ?

Don't do it! At least make sure you have a backup first. These forums are full of people who installed Homebrew and then can't run any basic command line operations. And since they didn't know anything about the command line to being with, hence their reason for installing Homebrew, they can't fix it.


All I can tell them to do is erase their hard drive and restore from backup. Since you are asking first, I recommend you make sure to have a Time Machine backup before you start. That way, you'll have something to restore from when it all stops working.

Oct 1, 2023 8:53 AM in response to etresoft

etresoft wrote:

Maybe circle back around and explain why you want to run Homebrew in the first place. Maybe there is a better way to accomplish what you are trying to do.


Probably related to this: Terminal - Permission Denied - Apple Community


OP is learning about zsh and Unix shell programming with an (unspecified) development project involving encryption and (presumably) data privacy and with a third-party app Bitwarden. And apps involving privacy and data security tend to be complex and subtle, and mistakes can be catastrophic.



Oct 1, 2023 1:23 PM in response to MrHoffman

Yes it relates to that -but now I am not going to download this as it is not reccomendable.


This computer is for experiments only ., After new year I will have a new one. But I discowered that a new computer will be used only for normal stuffs -it is not suitable for experiments. One can buy a used one for a few 100 dollars and that that can be used for anything .


   {
  "folders": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "name": "Folder Name"
    },
    ...
  ],
  "items": [
    {
    "id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
    "organizationId": null,
    "folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "type": 1,
    "reprompt": 0,
    "name": "My Gmail Login",
    "notes": "This is my gmail login for import.",
    "favorite": false,
    "fields": [
        {
          "name": "custom-field-1",
          "value": "custom-field-value",
          "type": 0
        },
        ...
      ],
      "login": {
        "uris": [
          {
            "match": null,
            "uri": "https://mail.google.com"
          }
        ],
        "username": "myaccount@gmail.com",
        "password": "myaccountpassword",
        "totp": otpauth://totp/my-secret-key
      },
      "collectionIds": null
    },
    ...
  ]
}


How to use this? . This kind of things looks wery mysterious . I copied this then I pasted it in text-editor as a plain text saved as bw.json but it did not worked . This formula is about how to condition a bw.json file


I wrote some documents in the formula -it did not worked


But also it states to create first a UTF-8 encoded plain text file - how to do this? I did it in text editor -but I do not know if that is the right way.


Oct 1, 2023 2:28 PM in response to garage4996

garage4996 wrote:

Yes it relates to that -but now I am not going to download this as it is not reccomendable.
...
How to use this? . This kind of things looks wery mysterious .


Looks like a wad of json, and probably used as a token for accessing some server. Probably also related to Bitwarden based on the earlier thread, and—again—you will want to acquire assistance from Bitwarden support. This unless you get very lucky around here and somebody has that app installed and can provide some assistance with it.


But also it states to create first a UTF-8 encoded plain text file - how to do this? I did it in text editor -but I do not know if that is the right way.


If you're not sure if it'll work, you're just going to have to try it.


Teaching how to program the shell, and how to use json and related tools, and whatever networking or such this particular sequence will involve, is a substantial effort, and probably also well beyond what can be reasonably accomplished around here. Particularly given that third-party app at the core of most of this.


Oct 1, 2023 2:44 PM in response to garage4996

Based on an online JSON Lint validator, here is the syntactically correct JSON:


{
    "folders": [
        {
            "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "name": "Folder Name"
        }
    ],
    "items": [
        {
            "id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
            "organizationId": null,
            "folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "type": 1,
            "reprompt": 0,
            "name": "My Gmail Login",
            "notes": "This is my gmail login for import.",
            "favorite": false,
            "fields": [
                {
                    "name": "custom-field-1",
                    "value": "custom-field-value",
                    "type": 0
                }
            ],
            "login": {
                "uris": [
                    {
                        "match": null,
                        "uri": "https://mail.google.com"
                    }
                ],
                "username": "myaccount@gmail.com",
                "password": "myaccountpassword",
                "totp": "otpauth://totp/my-secret-key"
            },
            "collectionIds": null
        }
    ]
}


and it is consumed well by json_pp in the Terminal:


json_pp -f json -t dumper < ./bw.json

or

python3 -m json.tool ./bw.json


Oct 4, 2023 5:29 AM in response to MrHoffman

Yes they are Catasthrophic -but still I need to learn this stuffs - doing just little progress -but slowly I am advancing.

The Clipboard can be a dangerous things too - both Apple Keychain and Bitwarden does autofill - but as I read on internet this can be also CHATASTROPHIC? I mean copy and paste ? Some cyber criminals may can see may copy and paste policy and stealing my clipboard ?


How to protect my computer against keyloggers and clipboards predators ?


I am advancing i zs shell -but slowly.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I run those commands on my Terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.