Thursday 13th October 2022
So today to continue on with coding we learnt about shell scripting. So we used a programme called visual studio code. We are using Bash scripting today. So I had to command prompts one was used for the Linux server the other wasn't. So echo $PATH shows the path where as $ env shows the shell. $ alias shows the different alias shortcuts. LL means long list and alf means all long pacification. $ vim .bashrc is to see the different environment variables. You use this to write out different functions that can be useful. Define Job sets up all the different files for you. Press escape and :q! To escape the script. We then transferred over the new file command we made onto the Linux server by example : scp hello world.sh - this would transfer over to the other server. Then to run the program all you would put for example : . Helloworld.sh this would then run the programme you created so mine said hello world! $# - number of parameters $0 - name of programme $1 pint parameters $2 second parameters $@ all parameters.
Comments