Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 6931  / 3 Years ago, thu, september 23, 2021, 8:07:17

I am a newbie in linux,maybe it's a silly question but could not make it though.



I have ubuntu 12.04 installed without GNOME and now as i wanted to know more about linux am facing few queries.



I want to write a script which will automate few daily task.



Now I have opened terminal and selected BASH(default) by typing echo $SHELL to write a script I found that a editor is the choise like vi or vim.



Firstly can I do script in open terminal/BASH without installing vim. I have installed vim with the following cmd sudo apt-get install vim.



How to check from CLI whether vim is successfully installed and where can I find the files in the directories.


More From » bash

 Answers
3

First, you should know that vim or vi or gedit are just text editors....



You can write a script without using using the text editors, i.e you can just write your script directly in your bash shell.. but you have lastly to redirect it to a file in order to call the script later.



It's better to use a text editor to do such thing and to make easy to edit and maintain your script..



now to know if vim is installed in your system or whatever other application you can use the following command apt-cache policy <package-name>



Check the answer in the question for more details


[#27882] Friday, September 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ronicod

Total Points: 71
Total Questions: 111
Total Answers: 111

Location: Montenegro
Member since Fri, Dec 10, 2021
2 Years ago
ronicod questions
Thu, Nov 11, 21, 06:26, 3 Years ago
Sun, May 7, 23, 13:57, 1 Year ago
Sun, Jun 26, 22, 06:13, 2 Years ago
Fri, Oct 14, 22, 13:55, 2 Years ago
;