Re: Ruby ???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/19/2011 09:24 AM, Mikkel L. Ellertson wrote:
> On 05/18/2011 07:40 PM, Aradenatorix Veckhom Vacelaevus wrote:
>> Well, the script isn't too long so you can open it easily with
>> gedit, kate or your favorite editor and remove the repeated number
>> of line and that's all. You don't need to complicate your life.
>>
>> Good Luck:
>> Aradnix
>>
> You like doing things the hard way. He said this was only the first
> 25 lines, so we do not know how long it is. I would probably do
> something like:
>
> sed -e "s@^[0-9]*[ ]*@@" input.file>  output.file
>
> This not only removes the line numbers, but the spaces after them as
> well. If what shows up as spaces in the posting are really tabs, a
> small change is required:
>
> sed -e "s@^[0-9]*\t@@" input.file>  output.file
>
> This also has the advantage of only removing the first tab, and
> leaving all the other formatting the same. The first version will
> remove all the spaces after the number until it hits a non-space
> character. That would probably mess up any indentation in the script.
>
> Mikkel
Well !!  If I knew anything about Ruby, I wouldn't have done it the hard 
way.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux