In vi editor how do you execute unix commands?
Answers were Sorted based on User's Feedback
Answer / km
:! cmd execute a single command (cmd) and return to vi
Is This Answer Correct ? | 22 Yes | 6 No |
Answer / pritesh_8
you can execute as
for example
:filename.c
this will copy current file in vi editor into filename.c
although it is not unix cmd but makes the use of cp cmd
Is This Answer Correct ? | 7 Yes | 3 No |
Answer / ravi kumar.r
compiling filename.c and then execution ./a.out
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / santhosh
we have 3 modes i.e {vi editor}
1.inserted mode
2.extended mode
3.command mode
by default ur in command mode when entering into vi..
if want excute any command just steps are ..
go to command mode i.e ESC+:what command u wish that one
ex-- esc+:pwd
esc+:date
Is This Answer Correct ? | 0 Yes | 0 No |
Name the general commands in using unix os for a beginner?
what does a process mean?
Name the unix command to find how many days the server has been up.
Does cp command overwrite files?
what is Online(STM) and offline diagnostics in HP-UX?
Can you enlist some commonly used network commands?
What is the syntax of grep command and what is its use?
How to get the operating system's information in unix?
What is FIND, GREP and SED ? Could you please give me the difference between all the three? Where we use this commnands?
how to make IGNITE-BACKUP in HP-UX?
What are bash commands?
When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include<stdlib.h> # include <stdio.h> int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output: