Re: [PLUG] Experiences with USB "null modem" cables.

2018-06-01 Thread Rich Shepard

On Fri, 1 Jun 2018, Tyrell Jentink wrote:


I have actually done file transfers over RS-232 null modem cables, in the
distant past... Both computers had native serial, as was the custom for
the time... But one had a DSL internet connection, and the other... Well,
it spit in the face of the "Computers with USB always have Ethernet" claim
thrown around here... So, I initially used a terminal client that could
serialize files and send it to another terminal; It worked, but I wanted
more. In those days, PPP-over-Serial was a prominent feature in many
commercial OSes, and I was able to cludge together some simple internet
connection sharing. It worked... Albeit, only as an academic study, a
proof that the text books weren't lying to us so to speak, as one couldn't
even imagine using that crap in production, even in those days...


Tyrell,

  UUCP, perhaps?


So... I foresee lots of reading about "Terminal Node" software in your
future. Of course, the only folks still playing that game use ham radios
instead of null modem cables... But the broad concepts and important
details are the same.


  Of course, there's always sneaker net ... on floppy disks to avoid the
current media.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Tesseract and Hebrew

2018-06-05 Thread Rich Shepard

On Tue, 5 Jun 2018, John Jason Jordan wrote:


Duh! Why didn't I think of that?


John,

  You were standing (sitting?) too close to the problem.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] LO Calc formatting question

2018-06-05 Thread Rich Shepard

  Hope to find an answer here rather than joining the LO mail list.

  Running libreoffice-6.0.4.

  I have a .csv file of precipitation data with 113,500+ rows and loaded it
in LO Calc to format columns. Looking at the modified .csv file I see that
the float values are still in double quotes despite being specified as
numeric.

  Is this a result of not saving the file as .ods before formatting and then
re-saving as a .csv file? Or is it that LO ignores the option of quoting
text only?

Thoughts?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] LO Calc formatting question

2018-06-05 Thread Rich Shepard

On Tue, 5 Jun 2018, Dick Steffens wrote:


Did you try, in the Text Import options, Other Options, [x] Quoted field
as text along with [x] detect special numbers? I have to do this when I
import .csv data from the credit union.


Dick,

  No, I didn't. I selected a new spreadsheet and opened the .csv file. No
importing of data.

  I selected all text columns and formatted them as text, the selected all
numeric columns and selected the floating point numeric format. When I saved
it I checked the box to quote text fields and specified double quotation
marks.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] LO Calc formatting question

2018-06-05 Thread Rich Shepard

On Tue, 5 Jun 2018, Dick Steffens wrote:


You're welcome. I remember that I found that trick, but I don't remember
how I found it. So, I'm glad it works for you, but I can't explain why.


Dick,

  Seeing that my LO formatting did nothing I used emacs (as I should have in
the first place) and quickly cleaned up the file for insertion in a postgres
database.

  I appreciate your suggestion.

Best regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Memory questions

2018-06-06 Thread Rich Shepard

  For a machine I'm building I have 2 G.Skill Sniper DDR3 1600 2x4G cards. I
assume that each one holds 4G of RAM and works only as the pair. Is this
correct?

  Can I add the a pair of the same brand/model each having 8G RAM for a
total of 24G?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Memory questions

2018-06-06 Thread Rich Shepard

On Wed, 6 Jun 2018, Jim Garrison wrote:


Each would likely work separately but you'd lose the dual-channel speed
boost by installing only one. It depends on which motherboard you're
using.


Jim,

  Currently, the two 4G modules are in slots A2 and B2. The motherboard is
an Asus Sabertooth 990FX.


Yes, I've done this several times. Again, check your motherboard specs,
but modern memory controllers are pretty good at figuring out what you
have installed and using it, as long as the timings are acceptable.


  While on the newegg.com web site I had a brief chat with a tech from
G.Skill. He said that combining a pair of 8G modules and a pair of 4G
modules might, or might not, work. Only trying would find out. So, rather
than risk wasting a lot of money on modules that would not work (either
way), I bought another pair of 4G modules of the same specs. A total of 16G
RAM should greatly speed up processing of huge spatial and numerical data
files compared with the 4G in my old 32-bit system.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Memory questions

2018-06-06 Thread Rich Shepard

On Wed, 6 Jun 2018, Ben Koenig wrote:


The support pages for your memory and motherboard will always have this
information.


Ben,

  They don't have information about installing two pairs, each pair having a
different capacity; e.g., 4G and 8G..


Looks like for the 990fx the pairing is organized by same-color. So if you
have 1 matched pair of DDR3. You can slot them into the brown ONLY, leave
the other 2 slots empty and you will get the speed. Assuming the RAM is
paired. After setting up the pair in the brown slots, repeat for beige.


  I know the G.Skill series I have works with the motherboard.


Since the beige/brown slots are on different channels, you usually don't
need to worry about using the exact same sticks or sizes.


  Actually, on this board all four slots are black.


I'm looking at a PDF from ASUS as I write this that tells me exactly what
will work. Clearly the newegg techs have no idea what they are talking
about.


  T'wasn't a newegg tech, but one employed by G.Skill. The newegg page has a
link to open a chat with the vendor. When they wrote that putting a pair of
4G modules and a pair of 8G modules might work and only trying it would
determine the results I decided that investing the money in a pair of 8G
modules that might not work for me wasn't worth it. In any case, having two
pairs of 4G modules provide four times the memory of my current desktop
server/workstation and that increase is Good Enough(TM) for my needs.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] NAS vs multi-bay USB external drives

2018-06-07 Thread Rich Shepard

  For infrequent use I want to consolidate usb-connected hard drives in a
single case. What are the relative advantages of a regular multi-bay
enclosure and a NAS enclosure?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NAS vs multi-bay USB external drives

2018-06-07 Thread Rich Shepard

On Thu, 7 Jun 2018, Jim Garrison wrote:


Different connections. NAS usually runs over Ethernet and uses NFS or
SMB remote drive sharing protocol over TCP/IP.


Jim,

  I thought this to be the case because it makes sense that it's a network
node.


USB uses a totally different, native and much more efficient driver stack,
and if capable of USB 3 can be pretty close to native eSATA speeds.


  This is good enough for me. It's also much simpler to maintain. Thanks
very much for clarifying,

Best regards,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] NAS vs multi-bay USB external drives

2018-06-07 Thread Rich Shepard

On Thu, 7 Jun 2018, Jim Garrison wrote:


As I forgot to mention, and John Jason Jordan pointed out, the NAS
approach is better if you need to share the disk with multiple systems.


Jim,

  Not an issue here. I'm clearing out excess computers. And, if I need to
access the data stored on the external USB drives from a portable I'll connect
them directly to that unit.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Explanation for message log entry

2018-06-10 Thread Rich Shepard

  When I view /var/log/messages I see an entry every half-hour when I'm
logged into the system:

Jun 10 05:47:56 salmo -- MARK --
Jun 10 06:07:56 salmo -- MARK --
Jun 10 06:27:56 salmo -- MARK --
Jun 10 06:47:56 salmo -- MARK --
Jun 10 07:07:56 salmo -- MARK --
Jun 10 07:27:56 salmo -- MARK --
Jun 10 07:47:56 salmo -- MARK --
(so far today)

  I'm curious where this originates and what it means. It's obviously benign
and seems harmless and I'm curious what generates this entry and why. My web
search foo was not up to the task of finding an explanation.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Explanation for message log entry [DONE]

2018-06-10 Thread Rich Shepard

On Sun, 10 Jun 2018, Paul Heinlein wrote:


In /etc/rsyslog.conf, you'll see an entry something like this:

$ModLoad immark

Just comment it out if your want the MARK entries to go away. It's
otherwise just a way to verify that your syslog log system is working even
when there isn't anything to log.


  Thanks, Paul. I'll know if syslog stops working when logwatch fails to
deliver its daily report.

Much apprciated,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Explanation for message log entry

2018-06-10 Thread Rich Shepard

On Sun, 10 Jun 2018, Bob Vinisky wrote:


I believe the option has changed since I last did this. In
/etc/rc.d/rc.syslog, near the top of the settings, isn option
SYSLOGD_OPTIONS=“-c “. By adding the syslog switch “-m 0” it should go
away (e.g. SYSLOGD_OPTIONS=“-c -m 0“). See man syslog.


Bob,

  Here I have:

# Options for klogd:
# '-c 3' = display level 'error' or higher messages on console
# '-x' = turn off broken EIP translation
KLOGD_OPTIONS="-c 3 -x -m 0"

with the just added '-m 0'.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Explanation for message log entry

2018-06-10 Thread Rich Shepard

On Sun, 10 Jun 2018, Rich Shepard wrote:


KLOGD_OPTIONS="-c 3 -x -m 0"
with the just added '-m 0'.


  Well, syslog (on my 14.2 installation) does not accept the -m option when
I restart it. Interesting.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Configuring Ubuntu Desktop for public users?

2018-06-11 Thread Rich Shepard

On Mon, 11 Jun 2018, Mike C. wrote:


Does anyone have any experience with configuring Ubuntu desktop for a
school, library or non-profit for many public users?


Mike,

  If the linuxK-12 project is still alive it would be a good resource for
you. At the Riverdale HS the network used diskless workstation clients and a
central server. How that was configured could be a guide for you.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] : Re: Configuring Ubuntu Desktop for public users?

2018-06-11 Thread Rich Shepard

On Mon, 11 Jun 2018, Mike C. wrote:


After I set it up, I turned it over to someone who was able to administer
it. There's no one currently here to administer such a configuration and
there's only 2 desktops that will mostly be used for email and some web
browsing. Fairly light usage as most people have smart phones and just use
that with the wireless network.


Mike,

  If the two hosts are ligtly used, can you set yourself us a user and use
ssh to remotely log in for administrivia purposes?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] WiFi not working. Ubuntu 16.04. Lenovo x200

2018-06-12 Thread Rich Shepard

On Tue, 12 Jun 2018, d...@dicksteffens.com wrote:


Yesterday, when we got to a hotel and I tried to fire up my x200 laptop,
all the WiFi connections showed up as "Out of Range." When I rebooted all
returned to normal. Tonight, at another hotel, rebooting does not fix the
problem. I'm able to use my wife's laptop without problem. Any thoughts on
whether this is something I can dig into on the road, or is this likely a
hardware problem?


Dick,

  Want a USB-connected external antenna?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] awk string functions

2018-06-13 Thread Rich Shepard

  I have many data files needing to be parsed and reformatted. The parsing
is easy using the print statement, but I'm struggling to find an awk string
manipulation function that reformats each field. Reading "Effective awk
Programming, 4th Ed." leaves me uncertain whether to use sub(), gsub(),
gensub() or something else.

  A trio of parsed lines look like this:

19881001 003000 0.75
19881001 01 0.75
19881001 013000 0.75

  What I want for output is this:

1988-10-01 00:30 0.75
1988-10-01 01:00 0.75
1988-10-01 01:30 0.75

  The first field is a date, the second a time in hours and minutes (seconds
are always zero), the third is the value associated with that date and time.

  The split() function, as I understand it, will split the line and assign
each field to an array. That's not what I want. The sub() family will
substitute characters based on regex and string position; I don't want this
either.

  I think that what I need is grouping each field by the number of digits,
then back referencing each group and separating with the appropriate
character (- or :) and my attempts to do this have failed.

  Pointers to resources that will teach me what I need to learn are needed.

TIA,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] awk string functions

2018-06-13 Thread Rich Shepard

On Wed, 13 Jun 2018, Russell Senior wrote:


You probably want to look at substr().


  I missed that one, Russell. I'll try it to figure out how to insert
characters at specific places.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] awk string functions

2018-06-13 Thread Rich Shepard

On Wed, 13 Jun 2018, Russell Senior wrote:


You probably want to look at substr().


  Thanks again, Russell. I now have a one-liner:
{ print substr($1,1,4)"-"substr($1,5,2)"-"substr($1,7,2), 
substr($2,1,2)":"substr($2,3,2), $4 }

That produces:

1988-10-01 00:30 0.75
1988-10-01 01:00 0.75
1988-10-01 01:30 0.75

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] WiFi not working. Ubuntu 16.04. Lenovo x200

2018-06-14 Thread Rich Shepard

On Thu, 14 Jun 2018, Dick Steffens wrote:


Tonight's stop is old-school. There's an Ethernet cable in the room. I
spoke with our hardware guru. He thinks it's likely that the WiFi hardware
in the computer has failed. I told him that when I look at the network
administration tool, click on "On" for wireless, it jumps from off to on
and back again, and that all the listed WiFi connections are "out of
range." He knows Ubuntu, and that info is what led him to think it's
hardware. I'll take it to him when we get back.


Dick,

  Replacement radios are available for reasonable prices, and I'm almost
certain you can find online instructions for replacing it.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] WiFi not working. Ubuntu 16.04. Lenovo x200

2018-06-14 Thread Rich Shepard

On Thu, 14 Jun 2018, Dick Steffens wrote:


[   21.949538] iwlwifi :03:00.0: RF_KILL bit toggled to disable radio.


  Looks to me that the radio switch is turned off.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] WiFi not working. Ubuntu 16.04. Lenovo x200

2018-06-15 Thread Rich Shepard

On Thu, 14 Jun 2018, Dick Steffens wrote:

Reboot solves the problem. I am able to see a couple of WiFi transceivers, 
one of which is this hotel. Since I'm hard wired, I'll stick with that for 
tonight. Tomorrow I probably won't have old-school Ethernet anymore, so 
knowing what to do to get WiFi working again is good.


Dick,

  The first time the radio in my Dell Latitude didn't work I found the
switch turned off. It happened inadvertently most likely when I was holding
the front of the unit while putting it in the case or taking it out. Since
then I always look at the switch position to ensure I've not turned it off.

Travel safely,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] TTL for named emacs keyboard macros

2018-06-15 Thread Rich Shepard

  I know how to create, name, and run emacs keyboard macros but haven't
found a reference that tells me how long that named macro is available. Are
they deleted when I leave emacs, or are they stored and can be run during a
later session?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] TTL for named emacs keyboard macros

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, Johnathan Mantey wrote:


The name lasts as long as your Emacs session.  You need to name them, store
them in a file, and then load them for your next session.


Jonathan,

  I looked at the online manual and wiki and didn't see this.


I pulled this from the Emacs Info file:



Then save the file.


  Okay. Now I'll figure out how to do this.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] gawk: repeating a field in printed output

2018-06-15 Thread Rich Shepard

  In the data files each line consists of a date and 24 numeric values. I
need to convert this "wide" format to a "long" format in which each line has
a date, hour (added in the script), and value. The test version of the script
is:

BEGIN { FS="," }
  { print $1, "00:00", $2"\n"
  $1, "01:00", $3"\n"
  $1, "02:00", $4"\n"
  }

  When run using the two line test file attached, gawk tells me I have a
syntax error at the second and third instances of $1.

$ gawk -f wide2long.awk test.dat > out.dat
gawk: wide2long.awk:9:   $1, "01:00", $3"\n"
gawk: wide2long.awk:9: ^ syntax error
gawk: wide2long.awk:10:   $1, "02:00", $4"\n"
gawk: wide2long.awk:10: ^ syntax error

  I have not found the proper syntax in my awk reference book or online. A
pointer to a reference or an explanation of the correct syntax is needed.

Rich2006-10-01,10.72,10.70,10.72,10.69,10.66,10.65,10.66,10.66,10.66,10.64,10.64,10.63,10.63,10.64,10.64,10.65,10.68,10.68,10.67,10.68,10.69,10.69,10.69,10.67
2006-10-02,10.67,10.67,10.67,10.67,10.68,10.67,10.68,10.68,10.68,10.68,10.68,10.68,10.68,10.68,10.64,10.64,10.69,10.75,10.74,10.70,10.69,10.71,10.70,10.70
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] gawk: repeating a field in printed output

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, Michael Rasmussen wrote:

Having not used awk in 20 years or so my wild ass guess is you need to add 
commas at the ends of lines 2 and 3, unless awk treats newlines as argument 
separators.


1 BEGIN { FS="," }
2   { print $1, "00:00", $2"\n"
3   $1, "01:00", $3"\n"
4   $1, "02:00", $4"\n"
5   }

And editing the script to add those commas and run on locally generated test 
data shows that to be the case.


  Thanks, Michael. I totally spaced that!

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] gawk: repeating a field in printed output

2018-06-15 Thread Rich Shepard

On Fri, 15 Jun 2018, Michael Rasmussen wrote:


Nobody can proofread their own stuff.


  True. That's why I request fresh eyeballs when I'm not seeing my errors.

  The remaining issue to be resolved is why there's an initial space at the
beginning of rows 2-end; only row 1 is left justified. It's obviously a
syntax error and I will be looking for it over the weekend.

Carpe weekend,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Emacs macro slows with repeated use

2018-06-17 Thread Rich Shepard

  I understand that emacs macros run interactively. One macro I'm using
concatenates three lines into one line. Running it singly execution is
quick. With 1000+ lines in the file I run it in repeat mode after checking
it's working properly: C-u 20 C-x e

  At first this runs quickly, but it slows to a crawl after several uses.
When I then execute the macro singly there is now a delay before it
completes.

  My web searches confirm that long execution of a macro can take a while,
but I've not found an explanation of why execution takes longer and longer
with each iteration.

  Your thoughts?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Emacs macro slows with repeated use

2018-06-17 Thread Rich Shepard

On Sun, 17 Jun 2018, Ken Stephens wrote:


As I understand processor performance, the longer a process runs the
smaller time-slice it gets. This seems counter intuitive to me, but if
this weren't the case, a process could hog the processor and would not let
other processes run.


Ken,

  I suspect this is related more to emacs than the processor as it occurs
with others, too.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Emacs macro slows with repeated use

2018-06-17 Thread Rich Shepard

On Sun, 17 Jun 2018, Rich Shepard wrote:


At first this runs quickly, but it slows to a crawl after several uses.
When I then execute the macro singly there is now a delay before it
completes.


  I tried disabling the undo buffer (M-x buffer-disable-undo) but this made
no difference. Killing that buffer and re-opening the file in a different
buffer brought up the speed.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Emacs macro slows with repeated use [RESOLVED]

2018-06-17 Thread Rich Shepard

On Sun, 17 Jun 2018, Rich Shepard wrote:


I tried disabling the undo buffer (M-x buffer-disable-undo) but this made
no difference. Killing that buffer and re-opening the file in a different
buffer brought up the speed.


  Found a work-around. When the macro slows down I open a new buffer and
copy the old one's contents to it. This copies the keyboard macro, too, so
the speed is back to the expected quickness. Then I save the new file under
the old file's name.

  Inelegant, but it works.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-17 Thread Rich Shepard

On Sun, 17 Jun 2018, Richard Owlett wrote:


In that brochure the word "Mac" occurs twice. "Linux" *NEVER* occurs.
Keyboarding skills are mentioned. They also ask the question "Does grammar
matter?"


Richard,

  Not an answer to your question, but an explanation of what you saw.
Microsoft and Apple are for-profit companies. The latter gave schools Apple
IIe computers which produced a couple of generations who equate 'Apple' and
'computer.' No one makes money selling linux so there's no incentive to
mention it.

  I am constantly amused to read the papers accompanying a piece of
hardware, such as my new Mediasonic 4-bay external hard drive enclosure,
that carefully describe its compatability with Windows 7, 8, (probably
others I've forgotten) and Mac with a minmum OS version number. They don't
need to include that it's compatible with all flavors of linux, *BSD, and
similar OSes which, incidently, don't need a cdrom with drivers to use the
hardware.

  Forgive your local library. As they buy hardware using public funds they
must follow county purchasing policies. These, most likely, don't mention
linux at all.

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Quick question on linux man page coverage

2018-06-17 Thread Rich Shepard

On Sun, 17 Jun 2018, logical american wrote:


... such as gvfs, which are intrinsic to the OS and some apparently embedded
in the kernal, most running under systemctl control, but with no
documentation.


L.A.,

  You don't need a man page for a tool over which you have no control. Your
example of gvfs is the Gnome virtual file system. Unless you're an
application or system developer, and need to know the API, a man page would
have no value to us reg'lar users. Wikipedia has an article about gvfs.


Should we be concerned that 3/4 of the programs running on a linux OS do
not have a man page?


  Nah.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

  I made a mistake when writing an awk script that inserts the time of an
observation with its value. I had 16:00 twice in a row rather than 16:00 and
17:00. This holds for every day in the year, and I have about 12 year's in
which to make the correction. Specifically, changing the second 16:00 to
17:00. A sample:

2012-10-01,16:00,297.94
2012-10-01,16:00,297.94

  I'm stuck trying to find a way to make the change using sed, awk, or grep.
How do I ignore the first instance and change only the second instance?

  If there's a perl script to do this, please share it with me as I'm not a
perl coder.

  I'm looking forward to learning how to do this job.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


I don't fully understand your question, but here are some examples
that may be a step in the right direction:


Robert,

  I did not provide as complete an explanation as I should have.

  Each file has 8761 lines, one for each hour of each day during the
(non-leap) year, plus a header line. It's not just two isolated lines,
unfortunately.

  I don't follow the logic of your two examples for finding only the
duplicate 16:00 hours in each day, and changing only the second instance to
17:00.


$ seq 1 5 | sed -e '1~2s/$/ --/'
1 --
2
3 --
4
5 --

$ seq 1 5 | sed -e '0~2s/$/ --/'
1
2 --
3
4 --
5


  Perhaps I need to write a python script that looks for the string, 16:00,
and sets a flag the first time that's found. The next time it's found, in
the following row, the flag is set so the string is changed to 17:00 and the
flag is unset. Then the script keeps reading until it encounters the next
day's 16:00 row.

Thanks,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


Good luck and let us know how things go.


  This can be done using awk and flags. I've not before used flags in awk so
I don't know the proper sequence of commands. What I have now is:

$2!="16.00" { print }
$2=="16:00" { print; flag=1 }
$2=="16:00" { $2=="17:00"; print; flag=0 }

  This prints the input file without change. If anyone has thoughts on how
to use a flag to change the value of field 2 please share them with me.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


A quick pass.  Needs testing and refactoring.

$2 != "16.00" { print ; next }
flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next }


  Thanks, Robert. I tried variations of this using if and regex for the
patterns, but they didn't work. Here's my test file (cleverly named
test.dat):

2012-10-01,14:00,90.7999
2012-10-01,15:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,18:00,90.8091
2012-10-01,19:00,90.8030

  Your script did what mine did, added two more rows with 16:00:

2012-10-01,14:00,90.7999
2012-10-01,15:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,18:00,90.8091
2012-10-01,19:00,90.8030

  Wrapping the patterns in parentheses and forward slashes makes no
difference. I'm sure the correct script will appear to be obvious once I
learn how to do this.

Best regards,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


Couple of typos and an addition (-F,) :


  I'm not seeing the typos.


{ cat <

  I have the code in a file and run it with the '-f' option:
gawk -f correct-double-hour.awk test.dat > out.dat

correct-double-hour.awk:

#!/usr/bin/gawk
#
# This script replaces the second instance of 16:00 with 17:00.

BEGIN { FS=","; OFS="," }
$2 != "16.00" { print ; next }
flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next }

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Carl Karsten wrote:


Python will be the easiest to understand.
is it always 16:00, or is it any time the whole line is duplicated,
bump the 2nds hour?


Carl,

  The values may differ by hour. It's only the second 16:00 hour each day that
is incorrect.


also, if you have one line for every hour of the year, how about
looping over all those datetimes, pared up with your data, and replace
all the datetimes (both good and flawed) with the calculated datetime.


  I have everything correct but for the duplicated 4pms.


Here is 1/2 of it:

from datetime import datetime, timedelta

for h in range(8760):
   timestamp = datetime(2012,1,1) + timedelta(hours=h)
   data_line = "{},{}".format(
   timestamp.strftime("%Y-%m-%d,%H:%M"),
   "123.456")
   print(data_line)


  Here's my test file (test.dat):

2012-10-01,14:00,90.7999
2012-10-01,15:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,18:00,90.8091
2012-10-01,19:00,90.8030

  I know it can be done in awk with a flag; but don't know how to do this
correctly. :-)

Thanks,

Rich


___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files [RESOLVED]

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


$2 != "16.00" { print ; next }  <= the decimal should be a colon, 16:00 vs 16.00


Robert,

  Oy! Too often we see what we expect to see, not what's actually there. I
had that in a FORTRAN IV program in the early 1970s.


flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next } <=
equality should be assignment, $2= vs $2==


  Ah, I missed that completely, as well as the order of pattern tests.


Here's a refactored version that you can put in a file:

BEGIN {OFS=FS=","} ;
flag == 1 && $2 == "16:00" { $2 = "17:00" ; flag = 0 } ;
$2 == "16:00" { flag = 1 } ;
{ print } ;


  And it works. Thanks for teaching me a tool that will be applied to other
awk scripts.


BTW, in your sample data set the 15:00 and 16:00 entries are identical
in the last field.  Is that expected or coincidental?


  Expected. This is river stage height data (the elevation of the water
surface) and it may be constant for a while, or vary fairly regularly. What
I'm interested in is the pattern cycles: diurnal, seasonal, and annual.

Best regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Carl Karsten wrote:


It could be done with transistors if you spend enough time ;)


Carl,

  Microprocessors.


I would add some code that verifies assumptions, like
are the dates always the same
is it just the 1700 are 1600?


  Those are hours on the 24-hour clock: 16:00 (4 pm) and 17:00 (5 pm).


anyway, assuming all our descriptions and assumptions are correct,
and the file starts at 2012-10-01,14:00


  Each day starts at 00:00 and runs through 23:00 hour-by-hour.

  The awk script Robert re-did does the job and I corrected all 20 years
where my script error provided two 16:00 hours.

Thanks,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files [RESOLVED]

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


Awk is a very nice "little" language. Glad to hear it worked. And thanks
for letting us know.


Robert,

  I do a lot of environmental data munging/wragling/ETL. These come to me as
.xml spreadsheets or the equivalent of line printer output sent as PDF files
(from federal resource agencies). I have found that emacs and awk, with the
occasional use of sed, do the job. Now and then I hit a new requirement
(such as reformatting a date from MM/DD/YY to -MM-DD) and my awk book
and web searches quickly find a working solution.

  I suspected that awk had flags, but the few web pages (including web fora)
did not use them the way I needed them to work. I've acquired a nice
collection of awk scripts that transform spreadsheet exports so the data can
be used in R, postgres, and GRASS.

Thanks again,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, david wrote:

While I believe the answer has already been found, would the 'uniq' command 
have been useful as an alternative?


david,

  Good question. Can it find a difference in a specific field and change
only one of them? Perhaps, but I've no idea.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-20 Thread Rich Shepard

On Tue, 19 Jun 2018, david wrote:


cat $file | uniq -u > $outfile


David,

  The above prints only the unique lines. I, too, have used this after grep
to remove duplicates.

  With the data referenced in this thread uniq will not do the job because
either each line is unique as a whole (same date, same hour, different
value) or considered a duplicate (same date, same hour, same value). The
former removes nothing, the latter removes the value for 5:00 pm.

  The need is to replace only the second duplicated 16:00 hour with 17:00.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-20 Thread Rich Shepard

On Tue, 19 Jun 2018, Galen Seitz wrote:


Up arrow or Ctrl-r to get the desired command. Ctrl-e to place the cursor
at the end of the command (if it's not already there), ctrl-w to erase the
last argument (the old filename). Then type your new argument (the new
filename), using the tab character for filename completion.


  This works for urxvt, too, with a minor difference. In urxvt the up arror,
or C-r to search for the last command, positions the cursor at the end of
the command line.

  A short bash script to repeat the command for all movie names will save
time if the moves are repeated with a different batch of file names.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-20 Thread Rich Shepard

On Tue, 19 Jun 2018, wes wrote:


Since the utility you're calling is mkvmerge, I might be tempted to create
an alias called "mm". That doesn't do anything on my system, but you might
want to check yours first to make sure it's not taken. Such an alias would
look like so:

alias mm='mkvmerge -i'

Thereafter, you can simply type mm , and you're off to the
races. Bash automagically passes along any arguments you supply to an alias.


  +1 for aliasing frequently used commands. I have several aliases in
~/.bashrc:

alias ls='ls --color=tty -F'
alias rm='rm -i'
alias ll='ls -la'

I've used them so long they're automatic.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-20 Thread Rich Shepard

On Wed, 20 Jun 2018, John Jason Jordan wrote:


Alias! Alias is prezackly what I was looking for!


  Alas! Alas! Where's my missing alias?

  Glad you found alternative solutions, John.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] rsync options for backup

2018-06-21 Thread Rich Shepard

On Thu, 21 Jun 2018, Galen Seitz wrote:


A question for those of you using rsync for backup, particularly those
using dirvish or rsnapshot.


Galen,

  I'm running dirvish here and cannot find any options to the rsync command.
There's nothing in /etc/dirvish/, /usr/sbin/dirvish/*, or
/root/dirvish-backup.sh. But, it's been working for years.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Application hijacks desktop

2018-06-21 Thread Rich Shepard

On Thu, 21 Jun 2018, John Jason Jordan wrote:


I installed kodi, a media player that is designed to turn a computer
into a media center. It has some interesting features so I'd like to
use it now and then. But apparently it never occurred to the developers
to add an option to run it in a window instead of full screen. When it
launches it takes over the screen so I cannot do something else while
watching a video. I spent an hour searching for a solution and came up
empty-handed.


John,

  I don't know what window manger you're using, but I have a couple of
applications which initially opened to occupy the full screen. But, they use
the default window manager which has an icon (second from the right here,
next to the 'x' that closes the frame). This icon is an open square which
displays as two stacked squares in full screen mode. Clicking that shrinks
the frame to it's default (non-full screen) size. You can then resize it to
your desired dimensions. It should retain that configuration the next time
you open the application.

  If you want screen shots of the two icons I'll send them to you off the
mail list as attachments are rejected at the border.

  Try it and let us know the results.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] procmail default action changed

2018-06-23 Thread Rich Shepard

  A few weeks ago procmail changed how it distributes _some_ (not all)
incoming mail. Specifically, messages not found in ~/procmail/recipes.rc
that used to be placed in my alpine INBOX as specifed in ~/.procmailrc:
DEFAULT=/var/spool/mail/rshepard
ORGMAIL=/var/spool/mail/rshepard
now are placed in ~/mail/office. I cannot figure out why.

  Also some messages from grass-u...@lists.osgeo.org when I'm cc'd end up in
my INBOX rather than being duplicated in ~/mail/spatia-analyses as specified
by these recipes:

* ^TO_.*@lists.osgeo.org
spatial-analyses

* ^CC_.*@lists.osgeo.org
spatial-analyses

  These recipes, and the default, worked flawlessly since the 1990s and I've
no idea 1) why they changed and 2) what to do to fix the issues.

  If there's a more appropriate mail list for this thread please point me to
it.

Regards,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] procmail default action changed

2018-06-23 Thread Rich Shepard

On Sat, 23 Jun 2018, Paul Heinlein wrote:


My first thought is that permissions on your .procmailrc file got tweaked
and are now too loose. I suggest running "chmod 0600" against it if that's
the case.


Paul,

  The permissions were 644. I just changed them to 600.


You can also try setting LOGFILE and VERBOSE (see the procmailrc man page
for details) to get procmail's view of its operations.


  I had those set for years and when I last looked at the log I saw nothing.
I just set VERBOSE=yes and LOGABSTRACT=all; LOGFILE=$PMDIR/log was not
commented out.

  I'll see what the log says in a couple of days as weekends are usually
light for incoming messages.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] rsync options for backup

2018-06-23 Thread Rich Shepard

On Sat, 23 Jun 2018, Russell Senior wrote:


Yeah, the hardlinks issue is one I encountered primarily when moving
backups to a new drive. My solution there was to build a shell script to
reperform the snapshots one by one from the old backups to the new one.
This limited the memory required.


  If the entire dirvish backup is to be moved from one hard drive to another
would dd be an appropriate way of doing this?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] rsync options for backup

2018-06-23 Thread Rich Shepard

On Sat, 23 Jun 2018, Russell Senior wrote:


Not generally. Moving disks is often to get a bigger drive, in which case
you want a bigger filesystem, including more inodes. Using dd and resizing
(afaik) does not increase the number of inodes available. I'm typically
doing this on RAID1 block devices so duplicating to a new drive (e.g. in
case of drive failure) is handled by the RAID layer.


Russell,

  Okay. Thanks.

  I've no need now to move the backup, but that drive's been in use for a
number of years (off during the day, on at night) and I'm thinking of being
prepared for the need to replace it.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Introduction - from Niagara Falls NY

2018-06-25 Thread Rich Shepard

On Mon, 25 Jun 2018, Chuck Hast wrote:


Well, I know that we have 1 in MO (RichardO.) I am in OKC, OK, and now NY,
wonder where else we have people.


  In the past we had members in Toronto, Fort Collins, and Belgium, plus
others I don't recall.

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Introduction - from Niagara Falls NY

2018-06-25 Thread Rich Shepard

On Mon, 25 Jun 2018, Mark Phillips wrote:


Mostly a heating expertjust put the computer outside in July and watch
it melt! ;)


  Think of it as dry curing to preserve it without refrigeration.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] ls -d does not work as it should

2018-06-25 Thread Rich Shepard

  According to 'man ls' the -d option should 'list directories themselves, not 
their
contents'. But, here it doesn't work. For example from within ~/:

$ ls -d
./

$ ls --directory
./

  I doubt this is a Slackware issue and I'm curious why it might not be
working as expected. Has anyone else run into this issue?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] ls -d does not work as it should

2018-06-25 Thread Rich Shepard

On Mon, 25 Jun 2018, Dick Steffens wrote:


Results on UbuntuMATE 16.04:

rsteff@ENU-2:~$ ls -d
.
rsteff@ENU-2:~$


  Huh! I'm glad to see I'm not the only one missing the expected results.

  Is there a mail list where this deficiency can be pointed out to the
appropriate developer(s)?

Thanks, Dick,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] ls -d does not work as it should

2018-06-25 Thread Rich Shepard

On Mon, 25 Jun 2018, Steve Christiansen wrote:


It's working as expected.
"ls" with no arguments lists the contents of the current directory.
"ls -d" with no other arguments lists the current directory, not its 
contents, which is of course "."


Steve,

  I interpreted the man page as using the -d option to list only
subdirectories of the cwd.

  Why would ls have an option to tell you you're in the current working
directory?

  What option would you use to list only subdirectories and not files in the
cwd or the subdirectories?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] ls -d does not work as it should

2018-06-25 Thread Rich Shepard

On Mon, 25 Jun 2018, John Meissen wrote:


I generally take the easy way and just do
 ls -l | grep drw

You could do
 find . -type d -maxdepth 1

Or if you want it sorted,
 find . -type d -maxdepth 1 | sort

Each has it's own quirks.


  Thanks, John.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] ls -d does not work as it should

2018-06-25 Thread Rich Shepard

On Mon, 25 Jun 2018, Brian Stanaland wrote:


I don't understand why this works but...

ls -d */


Brian,

  Okay ... that's another interesting solution.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] SANE not quite easy - Resolution

2018-06-27 Thread Rich Shepard

On Wed, 27 Jun 2018, Russell Senior wrote:


What kind of transparencies?  If they are 35mm slides, and lots of them,
there is a better way.


  Yep. I have a Wolverine F2D 35mm film to digital scanner. Stand-alone
unit. I'm about ready to put it on Craig's list as I no longer need it.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Thunderbird doesn't take focus sometimes

2018-06-29 Thread Rich Shepard

On Fri, 29 Jun 2018, Dick Steffens wrote:


I experience an odd thing with Thunderbird. I get an email asking me for
some document. I click on reply, go grab the document and drag it into the
reply. Then I highlight some irrelevant part of the text of the email to
delete it and hit . Instead of deleting that block of text, the
attached document opens. It's as if the act of highlighting text in the
window does not cause that window to have the focus. Has anyone else
experienced this sort of thing?


Dick,

  The answer to your question is 'no.' However, I suggest editing the reply
prior to attaching/inserting any external document. Thunderchicken might
still be working on the document rather than the highlighted text.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Procmail issue

2018-07-02 Thread Rich Shepard

  Not sure whether this is an appropriate venue for help with a new procmail
issue but I'll start here.

  I have a recipes.rc file in ~/procmail that directs delivery of incoming
messages to topic-specific files in ~/mail. The default is my alpine inbox:
/var/spool/mail/rshepard. Messages that do not match a procmail recipe, such
as uncaught spam, should end up in my inbox. This has worked for many years,
but changed a few months ago and I want to understand why it changed so I
can fix it.

  Now these uncaught spam messages end up in the 'office' file which is used
by these four maillists:
* ^TO_.*@xfce\.org
* ^TO_.*treeline-us...@lists.sourceforge.net
* ^to_.jabref-us...@lists.sourceforge.net
* ^to_taskjuggler-us...@googlegroups.com

  I've not modified the recipes since well before the procmail behavior
changed so I'm stymied in knowing how to return the behavior to what it was
before.

Rich



___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] When {[right question] >= (useful answer)} ?

2018-07-03 Thread Rich Shepard

On Tue, 3 Jul 2018, wes wrote:


All partitions are automatically readable/writable by all by default. One
would have to take extraordinary measures to restrict access to a
partition.


Wes,

  Not always, at least on Slackware. Partitions are owned by root.root and
while /tmp always retains 777 perms, /opt doesn't for some reason. So, as
root, I run 'chmod 777 /opt' and that fixes access for all.

Have a safe 4th,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] When {[right question] >= (useful answer)} ?

2018-07-03 Thread Rich Shepard

On Tue, 3 Jul 2018, wes wrote:


Filesystems have permissions, partitions don't. Files and directories have
owners, partitions don't.


Wes,

  Yep. I was thinking filesystems, not the partitions on the disk.

Apologies to all,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] When {[right question] >= (useful answer)} ?

2018-07-03 Thread Rich Shepard

On Tue, 3 Jul 2018, wes wrote:


I suspect the other Richard could be confused in a similar fashion, so
your reply was still valuable.


wes,

  I must have been undercafinated when I responded. Partitions are always
/dev/sd* (or similar) while file systems have names. It's been a hectic day
but I won't claim that as an excuse.

Best regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Spammers on the plug list

2018-07-04 Thread Rich Shepard

On Wed, 4 Jul 2018, Tomas Kuchta wrote:


We seem to have increased presence of spammers on the list either as
registered members or someone is compromised.


Tomas,

  My experiences are limited to the the two you mention here:


Do you get response from  customer support like the one mentioned by Rich
couple of months ago or Melina Taylor lovelygirl...@lovelynsacusal.pw or
...?


  The latter, using several domain names, appeared only yesterday after my
responses to a single thread. My mail logs show the former being rejected in
response to others threads to which I've not contributed. I've added the
latter name to the rejection list.

  Now and then I get similar spam messages from other mail lists so the
situation is not unique to here.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Spammers on the plug list

2018-07-04 Thread Rich Shepard

On Wed, 4 Jul 2018, wes wrote:


I'm pretty sure the customer support ones from a few months ago weren't
really spam, but just a case of emails being unintentionally routed to a
support queue. Probably some IT worker was subscribed with his work email
account, and then left that job and his emails were forwarded to the
general support address.


  That does seem to be the case as it comes from a South African help desk.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Spammers on the plug list

2018-07-04 Thread Rich Shepard

On Wed, 4 Jul 2018, Jim Garrison wrote:


Is the To: address the list or your specific email?


Jim,

  The ones I received were all addresssed directly to me. And were in
response to messages I posted to the mail list. Each a bit different, as
Dick reported. This morning's mail log review showed that several were
rejected yesterday by the header_check rule.

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Spammers on the plug list

2018-07-04 Thread Rich Shepard

On Wed, 4 Jul 2018, Jim Garrison wrote:


Do you have the ability to save raw emails including all headers to a
file?  If you accumulate several SPAMs and send me a tarball or zip file
to p...@jhmg.net (a throwaway address) I can take a look to see if I can
identify a sender.


Jim,

  On their way to you.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Spammers on the plug list

2018-07-04 Thread Rich Shepard

On Wed, 4 Jul 2018, Rich Shepard wrote:


 The ones I received were all addresssed directly to me. And were in
response to messages I posted to the mail list. Each a bit different, as
Dick reported. This morning's mail log review showed that several were
rejected yesterday by the header_check rule.


  Here are the senders:

Return-Path: 
Received: from mail.alonefemale.com (mail.alonefemale.com [45.72.28.172])

Return-Path: 
Received: from mail-qk0-f226.google.com (mail-qk0-f226.google.com 
[209.85.220.226])

  I received 3 from the first address, one from google, before blocking any
more.

  Wonder if this is one of the intrusive AI devices sold by google or amazon
that's become bored sitting on a shelf in someone's home.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Spammers on the plug list

2018-07-05 Thread Rich Shepard

On Thu, 5 Jul 2018, wes wrote:


At this time we are not requesting specific data (since I'm getting the
same spams you all are, I already have all the same info you do).
Unfortunately anyone who has received these spams will probably continue
to get them for some time while the spambot's script runs its course.

What I'm looking for are new occurrences, which will be replies to list
posts after noon on Wednesday. My suspicion is that there won't be, but
there's no way to be sure without waiting some time to see that it doesn't
recur.


wes,

  Yesterday's mail log has three rejected attempts, two after noon:

# grep Taylor maillog.1
Jul  4 06:21:40 salmo postfix/cleanup[23869]: 429B99928F: reject: header From: Melina Taylor 
 from mail.alonefemale.com[45.72.28.172]; 
from= to= proto=ESMTP 
helo=: 5.7.1 Rule H36
Jul  4 12:21:57 salmo postfix/cleanup[30475]: BE43F9928F: reject: header From: Melina Taylor 
 from mail.alonefemale.com[45.72.28.172]; 
from= 
to= proto=ESMTP helo=: 5.7.1 Rule H36
Jul  4 20:22:05 salmo postfix/cleanup[4505]: 94DA69928F: reject: header From: Melina Taylor 
 from mail.alonefemale.com[45.72.28.172]; 
from= 
to= proto=ESMTP helo=: 5.7.1 Rule H36

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Spammers on the plug list

2018-07-05 Thread Rich Shepard

On Thu, 5 Jul 2018, Dick Steffens wrote:


Nice work Wes. Thank you.


Ditto that.


  +2

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] PLUG (Yes, discussing PLUG)

2018-07-06 Thread Rich Shepard

On Fri, 6 Jul 2018, Michael Dexter wrote:


Thank you everyone who has helped make PLUG happen!


  +1

  We all benefit from the commitments made by many over the 20+ years I've
been a member. I appreciate the commitments by everyone.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] QEMU Win 7 Install Error

2018-07-10 Thread Rich Shepard

On Tue, 10 Jul 2018, Dick Steffens wrote:

Error continue install: Cannot access storage file 
'/var/lib/libvirt/images/win7-80GB.qcow2' (as uid:64055, gid:133): No such 
file or directory


Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 2339, in 
_check_install_status

    virtinst_guest.continue_install()
  File "/usr/share/virt-manager/virtinst/guest.py", line 524, in 
continue_install

    start_xml, final_xml, is_initial, False)
  File "/usr/share/virt-manager/virtinst/guest.py", line 420, in 
_create_guest

    dom.create()
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1035, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Cannot access storage file 
'/var/lib/libvirt/images/win7-80GB.qcow2' (as uid:64055, gid:133): No such 
file or directory


/var/lib/libvirt/images exists but is empty. Am I supposed to create 
win7-80GB.qcow2 and run the install again? And should it be a file or a 
directory?


Has anyone run into this before? It's mostly Greek to me.


Dick,

  It looks more like a Python error traceback than a Greek one. I would
'touch win7-80GB.qcow2' and try it again. Make sure the permissions match
those of the parent directories. This ensures the file exists and won't harm
a retry.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] QEMU Win 7 Install Error

2018-07-11 Thread Rich Shepard

On Wed, 11 Jul 2018, Dick Steffens wrote:


That solved the problem. I have successfully installed Win7 in QEMU. Next
I'll see how to move things between the host and the guest, and install my
transcription software.


  Yea, team!


Thanks for the suggestion.


  You're always welcome.

Best regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Learning how to use LVM

2018-07-15 Thread Rich Shepard

  Installed here on the Slackware-14.2 systems are llvm-3.8.0 and
lvm2-2.02.154. While there are many hits on the web search some are quite
old while others seem distribution-specific.

  I would appreciate pointers to introductions to current lvm tools so I can
learn to understand them and set them up on my new server and backup drive.

TIA,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Learning how to use LVM

2018-07-15 Thread Rich Shepard

On Sun, 15 Jul 2018, Russell Senior wrote:


https://en.wikipedia.org/wiki/LLVM
vs
https://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29


  Thanks, Russell. I saw the wikipedia article on LVM and didn't look for
LLVM or LVM2.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Frontier FiOS Installation

2018-07-20 Thread Rich Shepard

On Fri, 20 Jul 2018, Russell Johnson wrote:


I've had FiOS since before Verizon sold them. They set mine up slightly
differently.


  And, I've had the service since late last October. Like Jim's installation
The external OTN comes in the house as copper for the phone and Ethernet for
the 'Net. The installer offered a wireless router, but I pointed out that I
have one of those (set up as a WAP) and the Linksys and Ubiquiti routers so
I passed on his offer.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Filesystem problems with new USB drive

2018-07-21 Thread Rich Shepard

On Sat, 21 Jul 2018, John Jason Jordan wrote:


And this seller's listing says '230 sold.' The seller is galaxycentre13,
also located in Malaysia (different address) and shipping from the same
warehouse in Chino, CA. Galaxycentre13 has 98.4% positive feedback from
over 130K users.

I know on IMDB users can leave ratings for movies, and it's possible to
hack IMDB to pump up the positive numbers. (I've seen movies where it
was done by the production company.) I wonder about eBay.


John,

  Were I in your position, my negative experience with one of what appear to
be the two companies operating under different names would override any
posted positive feedbacks. I'd rather buy from a known good source, pay
more, but get what I ordered.

  You could probably buy an external 256G hard drive for a reasonable price
and known quality. Of course, you'd also need a bigger pocket than for a
thumb drive. :-)

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] An awk question: multiple actions acting on each line.

2018-07-22 Thread Rich Shepard




2006-10-01,10.72,10.70,10.72,10.69,10.66,10.65,10.66,10.66,10.66,10.64,10.64,10.63,10.63,10.64,10.64,10.65,10.68,10.68,10.67,10.68,10.69,10.69,10.69,10.67
2006-10-02,10.67,10.67,10.67,10.67,10.68,10.67,10.68,10.68,10.68,10.68,10.68,10.68,10.68,10.68,10.64,10.64,10.69,10.75,10.74,10.70,10.69,10.71,10.70,10.70
2006-10-03,10.70,10.70,10.71,10.72,10.72,10.71,10.72,10.72,10.72,10.72,10.72,10.72,10.72,10.72,10.71,10.71,10.71,10.72,10.73,10.73,10.72,10.70,10.70,10.71
2006-10-04,10.72,10.73,10.73,10.73,10.72,10.73,10.72,10.72,10.72,10.73,10.72,10.72,10.72,10.72,10.72,10.72,10.70,10.70,10.69,10.69,10.70,10.71,10.73,10.73
2006-10-05,10.74,10.75,10.71,10.69,10.71,10.74,10.75,10.74,10.71,10.70,10.69,10.70,10.69,10.70,10.70,10.71,10.72,10.72,10.71,10.70,10.70,10.71,10.72,10.71
2006-10-06,10.70,10.70,10.72,10.74,10.74,10.74,10.74,10.72,10.72,10.69,10.66,10.67,10.72,10.73,10.73,10.71,10.68,10.71,10.75,10.77,10.75,10.73,10.72,10.69

  The awk script intends to change this wide format to a long format. Each
line will have the date ($1), an added hour, then the numeric value ($3).

  I've tried two versions of the script, one using ';' to separate lines,
the other using '\n' to separate lines. Both print only the first value for
each date; e.g.,

2006-10-01,00:00,307.65
2006-10-02,00:00,307.6
2006-10-03,00:00,307.63
2006-10-04,00:00,307.65
2006-10-05,00:00,307.67
2006-10-06,00:00,307.63

  The awk script, 'wide2long.awk':

#!/usr/bin/awk

BEGIN { FS="," }
  { print $1",00:00,"$2+"296.93\n"
  $1",01:00,"$3+"296.93\n"
  $1",02:00,"$4+"296.93\n"
  $1",03:00,"$5+"296.93\n"
  $1",04:00,"$6+"296.93\n"
  $1",05:00,"$7+"296.93\n"
  $1",06:00,"$8+"296.93\n"
  $1",07:00,"$9+"296.93\n"
  $1",08:00,"$10+"296.93\n"
  $1",09:00,"$11+"296.93\n"
  $1",10:00,"$12+"296.93\n"
  $1",11:00,"$13+"296.93\n"
  $1",12:00,"$14+"296.93\n"
  $1",13:00,"$15+"296.93\n"
  $1",14:00,"$16+"296.93\n"
  $1",15:00,"$17+"296.93\n"
  $1",16:00,"$18+"296.93\n"
  $1",17:00,"$19+"296.93\n"
  $1",18:00,"$20+"296.93\n"
  $1",19:00,"$21+"296.93\n"
  $1",20:00,"$22+"296.93\n"
  $1",21:00,"$23+"296.93\n"
  $1",22:00,"$24+"296.93\n"
  $1",23:00,"$25+"296.93" }

  I've looked in my awk book and searched the web (perhaps with the wrong
search terms) and haven't found my syntactical error. Help is needed.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] An awk question: multiple actions acting on each line.

2018-07-22 Thread Rich Shepard

On Sun, 22 Jul 2018, Rich Shepard wrote:

  The data look like this: (why it was dropped from the original message
I've no idea.


2006-10-01,10.72,10.70,10.72,10.69,10.66,10.65,10.66,10.66,10.66,10.64,10.64,10.63,10.63,10.64,10.64,10.65,10.68,10.68,10.67,10.68,10.69,10.69,10.69,10.67
2006-10-02,10.67,10.67,10.67,10.67,10.68,10.67,10.68,10.68,10.68,10.68,10.68,10.68,10.68,10.68,10.64,10.64,10.69,10.75,10.74,10.70,10.69,10.71,10.70,10.70
2006-10-03,10.70,10.70,10.71,10.72,10.72,10.71,10.72,10.72,10.72,10.72,10.72,10.72,10.72,10.72,10.71,10.71,10.71,10.72,10.73,10.73,10.72,10.70,10.70,10.71
2006-10-04,10.72,10.73,10.73,10.73,10.72,10.73,10.72,10.72,10.72,10.73,10.72,10.72,10.72,10.72,10.72,10.72,10.70,10.70,10.69,10.69,10.70,10.71,10.73,10.73
2006-10-05,10.74,10.75,10.71,10.69,10.71,10.74,10.75,10.74,10.71,10.70,10.69,10.70,10.69,10.70,10.70,10.71,10.72,10.72,10.71,10.70,10.70,10.71,10.72,10.71
2006-10-06,10.70,10.70,10.72,10.74,10.74,10.74,10.74,10.72,10.72,10.69,10.66,10.67,10.72,10.73,10.73,10.71,10.68,10.71,10.75,10.77,10.75,10.73,10.72,10.69


Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] An awk question: multiple actions acting on each line. [RESOLVED]

2018-07-22 Thread Rich Shepard

On Sun, 22 Jul 2018, Russell Senior wrote:


awk -F, '{ for (i=2 ; i<=25 ; i++) {
printf("%s,%02d:00,%.2f\n",$1,i-2,$i+296.93) } }'


  Thanks, Russell. I've not before seen printf used this way and it
certainly is an elegant solution.

  BTW, Kelvin has nothing to do with these data. The numbers are heights.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] An awk question: multiple actions acting on each line.

2018-07-22 Thread Rich Shepard

On Sun, 22 Jul 2018, David Fleck wrote:


I got the attached script to do what you want (I think). Note that I had
to eliminate your readable formatting so as not to get extra spaces in the
output. Essentially, it was a matter of moving the quotes and commas
around.


David,

  The formatting is equally readable. It never occurred to me to move the
newlines to the beginning of each line rather than the end of the previous
line. Good lesson.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] An awk question: multiple actions acting on each line.

2018-07-22 Thread Rich Shepard

On Sun, 22 Jul 2018, David Fleck wrote:


BEGIN { FS="," }
{print $1",00:00,"$2+"296.93",
"\n"$1",01:00,"$3+"296.93",
"\n"$1",02:00,"$4+"296.93",
"\n"$1",03:00,"$5+"296.93",
"\n"$1",04:00,"$6+"296.93",
"\n"$1",05:00,"$7+"296.93",
"\n"$1",06:00,"$8+"296.93",
"\n"$1",07:00,"$9+"296.93",
"\n"$1",08:00,"$10+"296.93",
"\n"$1",09:00,"$11+"296.93",
"\n"$1",10:00,"$12+"296.93",
"\n"$1",11:00,"$13+"296.93",
"\n"$1",12:00,"$14+"296.93",
"\n"$1",13:00,"$15+"296.93",
"\n"$1",14:00,"$16+"296.93",
"\n"$1",15:00,"$17+"296.93",
"\n"$1",16:00,"$18+"296.93",
"\n"$1",17:00,"$19+"296.93",
"\n"$1",18:00,"$20+"296.93",
"\n"$1",19:00,"$21+"296.93",
"\n"$1",20:00,"$22+"296.93",
"\n"$1",21:00,"$23+"296.93",
"\n"$1",22:00,"$24+"296.93",
"\n"$1",23:00,"$25+"296.93"}


David,

  The listing was in the body of attempt #1, too.


You may be able to restore some of the whitespace. I took it all out
because otherwise lines wouldn't all start in column 1.


  I'll be darned! That's why the output of lines 2-end were indented one
space. Never occurred to me to not indent. Many thanks.

Best regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] gawk switch statement syntax errors

2018-07-23 Thread Rich Shepard

  gawk-4.1.3 is installed here. According to Arnold Robbins' 'Effective awk
Programming, 4th Ed',  page 154, the syntax for the switch statement is used
in this code:

# Get line length (number of fields)
switch (NR) {
case 36: # No shifts present.
{ print $1, $6, $7, $8, $9, $10, $11, $12, $13, $18, $19, $20, $21, $22, 
$23, $24, $25, $29, $30, $31, $32, $33, $34, $35, $36 }
break
case 37: # 1 shift present.
{ print $1, $6, $7, $8, $9, $10, $11, $12, $13, $19, $20, $21, $22, $23, 
$24, $25, $26, $30, $31, $32, $33, $34, $35, $36, $37 }
break
case 38: # 2 shifts present.
{ print $1, $7, $8, $9, $10, $11, $12, $13, $14, $20, $21, $22, $23, $24, 
$25, $26, $27, $31, $32, $33, $34, $35, $36, $37, $38 }
break
case ?:
break
}

  Running this code on data results in syntax errors:

$ gawk -f trim-fields.awk test.dat > out
gawk: trim-fields.awk:13: switch (NR) {
gawk: trim-fields.awk:13: ^ syntax error
gawk: trim-fields.awk:14: case 36: # No shifts present.
gawk: trim-fields.awk:14: ^ syntax error
gawk: trim-fields.awk:17: case 37: # 1 shift present.
gawk: trim-fields.awk:17: ^ syntax error
gawk: trim-fields.awk:20: case 38: # 2 shifts present.
gawk: trim-fields.awk:20: ^ syntax error
gawk: trim-fields.awk:23: case ?:
gawk: trim-fields.awk:23: ^ syntax error

  I'm sure it's a simple error on my part but I'm just not seeing the
problem.

  Test data set (test.dat) has lines with each length:

11/24/07 0400 12.12 |0400 2090 0.01| 12.10 12.10 12.04 12.08 12.12 12.12 12.10 
12.06 1200 12.00 |1200 1930 0.01| 12.08 12.06 12.07 12.04 12.00 12.04 12.03 
12.03 12.05 | 2000 2000 | 12.03 12.06 12.04 12.01 12.00 12.02 12.00 12.01
11/25/07  12.01 | 1950 0.01| 12.01 12.01 11.99 11.97 11.97 11.98 11.96 
11.96 2400 11.87 |2400 1770 0.00| 11.97 11.95 11.95 11.95 11.93 11.91 11.93 
11.93 11.95 | 1860 1860 | 11.96 11.97 11.93 11.93 11.91 11.89 11.89 11.90
11/26/07 1830 11.97 |1830 1890 | 11.87 11.87 11.90 11.90 11.89 11.86 11.87 
11.81 0800 11.78 |0800 1680 0.00| 11.78 11.88 11.86 11.79 11.81 11.89 11.81 
11.82 11.87 | 1770 1770 | 11.80 11.79 11.92 11.92 11.94 11.92 11.95 11.93
11/27/07 0230 12.05 |0230 1990 | 11.94 11.99 12.04 12.04 12.04 12.04 12.04 
12.03 2230 11.93 |2230 1840 | 12.03 12.02 12.02 11.98 11.95 11.97 11.96 11.95 
11.98 | 1900 1900 | 11.94 11.94 11.94 11.96 11.97 11.97 11.94 11.93
11/28/07 2000 12.02 |2000 1950 | 11.94 11.92 11.91 11.92 11.90 11.88 11.88 
11.86 1430 11.81 |1430 1710 | 11.85 11.85 11.86 11.86 11.85 11.82 11.82 11.83 
11.89 | 1790 1790 | 11.86 11.86 11.87 11.90 12.02 12.00 11.90 11.91

  I'm stuck (again) and I don't think this is a white space issue or an
improper newline placement.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] gawk switch statement syntax errors [RESOLVED]

2018-07-23 Thread Rich Shepard

On Mon, 23 Jul 2018, Russell Senior wrote:

Russell,


Second, I think you want NF, not NR.


  Yes. That is correct.


Thirdly, I think you want to just write matching rules (mawk manpage didn't
mention switch), e.g.:

 NF == 38 { print stuff }
 NR == 37 { print other stuff }


  Sigh. Yes, specifying the pattern followed by the action is the solution.
I moved this processing from a bash script using IF - ELIF - ELSE so the
switch statement seemed to be the right choice.

  Thanks for getting me back to the (g)awk solution.

Best regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] gawk switch statement syntax errors

2018-07-23 Thread Rich Shepard

On Mon, 23 Jul 2018, Tomas Kuchta wrote:


Do not use switch/case - just use NF==35 {print "I see 35 columns on this
line"}
... type of a code.

If you need more than that you can do something like this:
NF==35 && $2<5 {print "I see 35 columns on this line and column 2 is less
than 5"}

I guess that is what Russell was saying too.


Tomas,

  It turns out that the switch/case statement works when the whole thing is
enclosed in curly braces because it's all part of the action response. So it
would look like this:

{ switch (NF) {
  case 1:
...
  case 2:
...
  }
}

  But, using the number of fields as the pattern does make it easier to
read:

NF == 36 { print  }

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] gawk switch statement syntax errors

2018-07-23 Thread Rich Shepard

On Mon, 23 Jul 2018, Tomas Kuchta wrote:


Depending on your awk script and/or your data - this can have significant
runtime impact, beside nicer coding style.


Tomas,

  It takes me 5-10 minutes to highlight data in the PDF file and paste it
into a text file. When done the shell script, calling two sed and six awk
scripts runs in less than a second. The prompt returns almost immediately.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] gawk switch statement syntax errors

2018-07-24 Thread Rich Shepard

On Mon, 23 Jul 2018, Tomas Kuchta wrote:


Maybe you can speed things up by pdf2txt and identify the lines of interest
in awk.


Thomas,

  Almost every page is different. All have headers, data for a variable
number of hours (some with flags in the left margin, most without), and some
have summaries at the bottom. Then there are the days with missing data. And
some days have data in a specific column (but not on all data rows) while
other days are blank in that column.

  And, this is a one-time process. It's to get the data from the source
documents into a format suitable for import into a database and statistical
analyses.

THanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Changing tmpfs mount point

2018-07-25 Thread Rich Shepard

  It may well be that the reason opera and chromium crash upon loading is
where tmpfs is mounted.

  On my system its mount point is /tmp
tmpfs/tmp tmpfs   defaults,mode=1777  0   0

On a working 32-bit system its mount point is /dev/shm:

tmpfs/dev/shm tmpfs   defaults 0   0

  Can I change the tmpfs mount point from /tmp to /dev/shm? If so, do I need
to reboot the system for this to take effect or can I remount it as root?

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Changing tmpfs mount point

2018-07-25 Thread Rich Shepard

On Wed, 25 Jul 2018, Rich Shepard wrote:


 It may well be that the reason opera and chromium crash upon loading is
where tmpfs is mounted.


  Looking at /etc/rc.d/rc.local I see that /dev/shm should be the mount
point when the system is rebooted; at least, I _think_ that's where tmpfs
should be found:

# Change perms on /dev/shm: postgres & chromium need access
chmod 1777 /dev/shm/

  Postgres works; chromium doesn't


tmpfs/tmp tmpfs   defaults,mode=1777  0   0


  The system was rebooted two months ago when a new kernel was installed.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Changing tmpfs mount point

2018-07-25 Thread Rich Shepard

On Wed, 25 Jul 2018, wes wrote:


tmpfs and /tmp are not the same thing.


Wes,

  Yes. I'm reading about this. tmpfs is a filesystem that acts like a RAM
disk and uses both RAM and swap.


... it looks like in one case you have a
/tmp which uses tmpfs, but this is not required for anything to work. /tmp
simply needs to be writable. have you tested that?


  Yes, /tmp is writable. That's where alpine saves outbound e-mail messages
and where SlackBuilds.org packages are placed when built and before being
installed.

  What I've just learned is that tmpfs is supposed to be mounted on /dev/shm
(for 'shared memory'?) with perms 1777. Now, /dev/shm has 4 old files none
of which I need:

-rw--- 1 postgres postgres 4620 May 27 08:12 PostgreSQL.149263255
-rw-rw-rw- 1 rshepard users  16 Jun 14 14:12 sem.ADBE_REL_rshepard
-rw-rw-rw- 1 rshepard users  16 Jun 14 14:12 sem.ADBE_ReadPrefs_rshepard
-rw-rw-rw- 1 rshepard users  16 Jun 14 14:12 sem.ADBE_WritePrefs_rshepard

  I think the problem is that tmpfs was somehow incorrectly mounted because
/etc/fstab shows this:

/dev/sda9/tmp ext3defaults 1   2
tmpfs/tmp tmpfs   defaults,mode=1777  0   0

  So, can I do this to correct tmpfs?

#  mount --bind tmpfs /dev/shm

and not need to reboot?

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Changing tmpfs mount point

2018-07-25 Thread Rich Shepard

On Wed, 25 Jul 2018, Rich Shepard wrote:


 So, can I do this to correct tmpfs?

#  mount --bind tmpfs /dev/shm

and not need to reboot?


  Here's where I learned about tmpfs and bind mounts:

<https://hosam.wordpress.com/2011/02/08/tmpfs-and-bind-mounts/>

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Changing tmpfs mount point

2018-07-25 Thread Rich Shepard

On Wed, 25 Jul 2018, wes wrote:


It is weird that fstab shows two entries for the same mount point (/tmp).
However that in itself doesn't break anything.


Wes,

  That's because tmpfs was mis-mounted.


If you want to try each one individually, you can sudo umount /tmp, then
check mount to see if the other one still shows up, and issue a second
umount /tmp. Then mount -t tmpfs /tmp and see what happens.


  What I want to do is 'umount tmpfs', the 'mount tmpfs /dev/shm'


So my conclusion based on the info provided is that you don't need to
change anything, and the problem with Chromium crashing is more likely
somewhere else.


  No, the issue was first reported in 2015. Same problem because tmpfs was
not mounted on /dev/shm


What sort of crash are you seeing? Do you get any errors? Have you tried
running Chromium from a terminal, to see if there is any interesting
console output?


  Both chromium and opera open and immediately shut down. The error is seen
when starting chromium on a console.

  If I correctly understand what you've written, I can umount and re-mount
tmpfs without breaking anything. Correct?

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] reccomendations for domain providers

2018-07-25 Thread Rich Shepard

On Wed, 25 Jul 2018, Joe Shisei Niski wrote:


I'm looking for a domain provider for a small, low-profile,low-traffic 
website.


Joe,

  Nearly Free Speech . The price recently
went up from $0.05/month to $0.35/month. It'a DIY web host. They have
pricier options but for my static site it's ideal.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Changing tmpfs mount point

2018-07-25 Thread Rich Shepard

On Wed, 25 Jul 2018, wes wrote:


You're still referring to tmpfs as if it were a device. It isn't.


Wes,

  But a bind mount would work, yes?


If there's a known issue with chromium and opera relating to something not
being mounted using tmpfs, do you have a link to a description? I tried
googling a little, but didn't find the right thing quickly.



What is the console output you get?


  See this web page:

https://bugs.chromium.org/p/chromium/issues/detail?id=571394

This is what /etc/fstab should have:
tmpfs/dev/shm tmpfs   defaults 0   0

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Changing tmpfs mount point

2018-07-26 Thread Rich Shepard

On Wed, 25 Jul 2018, Ben Koenig wrote:


You say on your system you have it set to
tmpfs/tmp tmpfs   defaults,mode=1777  0   0

This means that YOU manually moved the /tmp folder,


Ben,

  Actually, no. I've never did anything with tmpfs, other than ignore it. It
was onlyh yesterday that I looked into just what it is and learned that it
was mis-mounted. Way back when, I set /dev/sda9 to mount on /tmp. Somehow
that was changed to a sort-of RAM disk rather than a hard drive partition.

  This may well be the result of upgrading this system from an earlier
distribution version when tmpfs was not mouted as /dev/shm.


Two Months ago you rebooted your computer and every file in /tmp vaporized.
All thanks to a change you made in /etc/fstab.


  I never saw an empty /tmp after rebooting. Every time I've looked in /tmp
the usual files are there.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


  1   2   3   4   5   6   7   8   9   10   >