Quote:
Originally Posted by deepti.1104
I have a file say x and i need to update with some values in it, and check te output. I need the commands to edit the file, save the file , run the file and how to insert the text and delete the text in the file in bash(bourne shell). Please give me these commands. that shud help me.
thanks
|
Deepti,here are the commands that can help you..
file name is x--
1..
vi x --> file is open in commad mode.
2.. for navigation in
vi use these commands-
a. h->to move left
b. j->to move down
c. k-> to move up
d. l-> to go right
3.. To write something in
vi you have to press i or a to put u in insert mode or append mode.write something in file.
4.. press x to delete a word,dd to delete a line,r to replace a word.
5.. see man
vi ->there are so m any commands to do editing and navigation.
6.. To save press escape :wq ->it will save and exit.
escape :w ->only save
escape :q quit
escape :q! ->quit without save.
Thanks,
Namish