I would like to know if it is possible to get the text output that is displayed in the terminal by running a shell script and display it in a Scrollable Text View, using applescript. for example:
The output that the command: git clone https://github.com/torvalds/linux.git displays as shown in the image below would be displayed in a Scrollable Text view, would that be possible?
P.S:I'm sorry if the explanation was not clear, I hope someone understands and can help me!!

The steps for getting output from an asynchronous task like this are:
To help with converting from Objective-C, Apple provided a conversion guide with their AppleScriptObjC Release Notes, but other than examples posted on various web sites and forums, that is about it. In general, for specific information about the various Cocoa classes and methods, you will need to look them up in Apple's documentation (for Swift you can switch to the Objective-C equivalent).
Note that an NSTextView does not have any terminal emulation (ANSI escape codes, etc), which is not trivial (take a look at iTerm2 for an example terminal application), so there won't be any cursor control. Git is also a little weird in that the progress uses standard error, so that will need to be redirected to standard output.
For a plain Xcode example, create a new AppleScriptObjC project and add the following statements to the AppDelegate:
In the Interface Editor, add a scrollable text view to the main window and connect it to the
textViewproperty, edit the currentDirectory and gitPath locations as needed, and put a statement in theapplicationWillFinishLaunchinghander to callstartTask().For something a bit simpler (shorter) to test with that still has a little output, the task arguments can be changed to something like: