![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| lp command can't change cpi | mountainwater | HP-UX | 3 | 05-13-2008 04:54 AM |
| need command to change permissions | calredd | UNIX for Dummies Questions & Answers | 1 | 04-28-2007 09:53 AM |
| SED command to change ./ to a space | bobk544 | Shell Programming and Scripting | 11 | 04-05-2007 05:46 AM |
| How to change blocksize for in tar command | KhawHL | UNIX for Dummies Questions & Answers | 10 | 11-10-2006 07:04 PM |
| Change directory command (cd) | oscarr | Shell Programming and Scripting | 4 | 08-23-2002 05:30 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
how to change something is a command?
Using !! or !x we can repeat previous command. If I want to repeat the command with something changed, what do I do? Say,
The prev. command cat a.txt | grep "pp" > a.out The new command cat b.txt | grep "pp" > b.out Is there a short way? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
If you are in the unix prompt, typing the escape key will allow you to review
your previous commands as you are using "vi". You can start with "k" to go back to each command. Is this what you are referring to? |
|
#3
|
|||
|
|||
|
what is the os and shell you are using ?
|
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
||||
|
||||
|
With csh,
% cat a.txt | grep "pp" > a.out % ^a^b cat b.txt|grep "pp" > a.out % Note that it changes the first occurance, not all occurances. I don't know if there is a way to change all occurances. |
||||
| Google The UNIX and Linux Forums |