224k views
0 votes
You need to use the vim editor to create a script file to change and export the SHELL environmental variable as the C-shell.

User Sarabjit
by
7.4k points

1 Answer

4 votes

Final answer:

To use vim to create a script to set the SHELL environmental variable to the C-shell. To do this, open vim, enter insert mode, type the script that changes the SHELL variable, and make the script executable.

Step-by-step explanation:

You need to use the vim editor to create a script file that changes and exports the SHELL environmental variable to use the C-shell.

To do this within vim, you would start by opening your terminal and typing vim scriptname.sh. Once in the editor, you would enter insert mode by pressing i and then type the following script:

#!/bin/bash

After typing this, you can save and exit the editor by pressing ESC, followed by typing:wq to write to the file and quit. Make the script executable with the command chmod +x scriptname.sh. Once your script is ready, you can execute it with ./scriptname.sh to change the SHELL environment variable to the C-shell.

User Jwkoo
by
7.7k points