How to show a script without comments?
Vesa-Pekka Tapani Mikkola
mikkola.pekka at saunalahti.fi
Mon Aug 1 19:53:05 UTC 2016
Hello.
Thank You for writing.
I don´t know exactly who all got first hand knowledge about the unknown
appearence in sight previously in Tampere.
The first appearence of first little difficulties started in
2014.04-2014.september(october).
I had adsl via telphoneline in from one.After it stopped to work
ordinarily I chose adsl from an other one.Soon after it it collapsed and
I ended it and were without a pc... until 10.2016 till now a days.
I don´t know wheather the issue is the same.Thats why I wrote.
Now the out of normal function has ended.
Tablet is not working yet.
When I studied the whole matter I had Ubuntu 14.04.3 in via it´s own ones.
I have no licence or free ones done,just an ordinary user at home but
interested and if something also giving as crazy it may seem.
Sigma: I have bougth the machines to work time of there´s so also Ubuntu
should do it´s job as wanted also.
I am a little over 60,I don´t work any more. Time to time I play the
Piano in a little pub here whitch happened to be one of my professions
in past.
I have retired whitch at the same time is the only income to me more of
whitch I have not earned while
still working.
I got a email in whitch he told me that the "mess" had been in their ufw
saying also that it wasn´t mine.
It may be happend world wide in a way.
Thats why.
Pekka
01.08.2016, 22:25, Joel Roth kirjoitti:
> Ralf Mardorf wrote:
>> Hi,
>>
>> how can I display a shell script without comments and empty lines, but
>> also without cutting commands?
>>
>> This is an example text file:
>>
>> [weremouse at moonstudio tmp]$ cat test.txt
>> ## test file.
>> test # test
>> test 2
>> echo "Hello #"
>> echo "Hello #" # Oops
>>
>> A simple egrep line, doesn't remove all comments:
>>
>> [weremouse at moonstudio tmp]$ egrep -v "^#|^$" test.txt
>> test # test
>> test 2
>> echo "Hello #"
>> echo "Hello #" # Oops
>>
>> A simple sed line, does remove all comments, but cuts commands:
>>
>> [weremouse at moonstudio tmp]$ sed "s/#.*$//g" test.txt | grep -v ^$
>> test
>> test 2
>> echo "Hello
>> echo "Hello
> Hi Ralf,
>
> This works for double quotes. Removes blank lines.
>
> cat test.txt | perl -nlE 's/#[^"]*$//g; say unless /^\s*$/'
>
> This won't work because of shell quoting rules.
>
> cat test.txt | perl -nlE 's/#[^'"]*$//g; say'
>
> In this case, you'll need a stand-alone script, I think.
>
> cheers,
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mikkola_pekka.vcf
Type: text/x-vcard
Size: 245 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160801/b8a54999/attachment.vcf>
More information about the ubuntu-users
mailing list