![]() |
Shell Tips & Tricks - Part 2
Part I - Shell Tips & Tricks
Clear and Disable Bash HistoryUse the Bash inbuilt history command: Code:
history -cCode:
unset HISTFILEAmpersand (Background Jobs)& is a inbuild operator to fork processes. "If a command is terminated by the control operator &, the shell executes the command in the background in a subshell" Code:
[root@pradeep test]# sleep 60 &Code:
[root@pradeep test]# echo $!Code:
[root@pradeep test]# jobsCode:
[root@pradeep test]# kill %1Search An Replace in viOpen a text file in vi/vim and goto command mode by pressing ECS and then ':', the search and replace command will be like, Code:
%s/oldString/NewString/gCode:
5,10 s/oldString/NewString/g |
Re: Shell Tips & Tricks - Part 2
Cool, the history one was really nice, it really helps me ;-)
|
Re: Shell Tips & Tricks - Part 2
Nomination for Article of the month - Aug 2009 Started.
|
Re: Shell Tips & Tricks - Part 2
Vote for this article for Article of the month - August 2009
|
| All times are GMT +5.5. The time now is 08:57. |