![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cannot store integer value | bennichan | Shell Programming and Scripting | 5 | 04-10-2008 11:20 AM |
| Grep results to store in a shell variable | jojan | Shell Programming and Scripting | 3 | 07-26-2007 09:44 AM |
| how can i store it ? | shamal | High Level Programming | 2 | 12-08-2001 01:19 AM |
| How to store username | dinplant | Shell Programming and Scripting | 3 | 11-13-2001 05:34 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
grep and store
When i grep a file and store it in a file it is storing as a zero byte file any way to avoid that.....
|
| Forum Sponsor | ||
|
|
|
||||
|
Two solutions ...
With sed (2 steps): Code:
sed -n '/expression/p' filename > tempfile mv tempfile filename Code:
perl -n -i -e 'print if /expression/' filename Jean-Pierre. |
||||
| Google The UNIX and Linux Forums |