Removing asterisks from a file

Karl Larsen k5di at zianet.com
Thu Oct 16 12:28:13 UTC 2008


charlie derr wrote:
> Avi Greenbury wrote:
>   
>> Karl Larsen wrote:
>>     
>>>     And if you do not like all that //\./\ which is confusing in the 
>>> most basic case,
>>>       
>> Most early, possibly.
>>
>> Once you've used it a couple of times, it really isn't confusing.
>>
>> s/<find>/<replace>/<options>
>>
>> is not a difficult layout to remember, especially when the only options 
>> most people need are g for matching more than once and i for matching 
>> case insensitively.
>>
>>     
>
> The OP did ask for a command-line solution.  The point about s/this/that/g being confusing or not is really about escaping things 
> (imo), but also, if there's an option to move away from a strictly command-line solution, then jumping straight to a GUI editor 
> might be too far afield.   The way I accomplish this is:
>
> emacs file.txt
> [esc]
> %
> *
>
> !
> [ctrl]-x
> [ctrl]-s
>
>
>
> (the blank line in the middle is an extra carriage return)
>
> 	~c
>
>   
    Well as we use the Gnome GUI things provided we get more used to 
click this and that to do things. I really like and use gedit and still 
use joe in a terminal. But I learned to like Ctrl-k early in the life of 
computers.

Karl



-- 

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
   PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7





More information about the ubuntu-users mailing list