How can I execute to .sh file for my current terminal?

Viewed 152

I want to create an .sh file for my regular uses for terminal commands, for exactlye export operation.

I mean I have an script like x.sh and inside the file I have these lines;

cd ../../......../flutter/bin
export PATH="$PATH:`pwd`"

So I am trying to add flutter commands to my current terminal.

More clearly, I am trying to achive just open a terminal, and write sh x.sh, and after the current terminal just access to flutter commands like "flutter doctor" or something.

So, it is the question; How can I succeed this ?

And also, I am really sorry for my bad english and thank you for your precious time.

Thank you for your help :)

Edit: I found the solution on https://askubuntu.com/questions/917340/exporting-environment-variable-using-sh-file

just using this command on terminal; . x.sh and thats it.

0 Answers
Related