Search Results

Search: Posts Made By: drl
728
Posted By drl
Hi. I think those of us who use macos may...
Hi.

I think those of us who use macos may need to get used to zsh. Here is a demo zsh script that was run on Mojave, not using eval:
#!/usr/bin/env zsh

# @(#) z1 Demonstrate feature.
...
663
Posted By drl
Hi. Using pcregrep: pcregrep -o1...
Hi.

Using pcregrep:
pcregrep -o1 'status_(.*?)[.]log' <( ls *status* )
The -o1 extracts parentheses group number 1.
and will produce:
INTPHLK11
INTPHLK21
OSMPRD1
SOACAT1
cgsm1
cgsm2...
Forum: What is on Your Mind? 4 Weeks Ago
967
Posted By drl
Hi. Slow, but still impressive. Might...
Hi.

Slow, but still impressive.

Might be an interesting project to run on a simulator:

VICE - the Versatile Commodore Emulator (http://vice-emu.sourceforge.net/)
or something similar.
...
2,496
Posted By drl
Hi, kbrazil. Thanks for the code. I installed...
Hi, kbrazil.
Thanks for the code. I installed it, tried it out, and it worked as expected.

For your next rev, I suggest:
jc [-p] -- "command"
So that jc -- "du" would run the du command from...
753
Posted By drl
Hi. We use a variety of platforms, so we...
Hi.

We use a variety of platforms, so we often need to identify the one on which we are working. Here is a sampling showing the use of:

GNU script config.guess,
file /etc/issue,
standard...
198
Posted By drl
Hi. In the interest of completion, here is...
Hi.

In the interest of completion, here is one solution: use pr. The data file had 54 lines in it, so I used a same-length data file with this script:
#!/usr/bin/env bash

# @(#) s1 ...
Forum: OS X (Apple) 10-26-2019
1,227
Posted By drl
Hi. Thanks to Scrutinizer for starting this...
Hi.

Thanks to Scrutinizer for starting this (and possibly to wisecracker for an earlier note).

My collection of links is below, in no specific order of usefulness.

My current interest in...
488
Posted By drl
Hi. If you are going to be dealing with...
Hi.

If you are going to be dealing with dates frequently, you might want to look at a package called dateutils. It is available on several platforms. I use Debian, but it's available even on...
2,171
Posted By drl
Minor comment
Hi.

I seem to recall that Apple will ship zsh as the default shell in the future, so perhaps they don't really care about the old bash version (but will likely supply bash to avoid breaking extant...
Forum: Programming 08-28-2019
4,166
Posted By drl
Hi. Looks like progress. When I run...
Hi.

Looks like progress.

When I run into trouble with perl that I cannot seem to solve by looking in the books, I often search PerlMonks - The Monastery Gates (https://www.perlmonks.org/) --...
Forum: Programming 08-27-2019
4,166
Posted By drl
Hi. Good to see people picking up perl....
Hi.

Good to see people picking up perl. Although use has declined, I still find it very useful. The O'Reilly trilogy is quite useful, and I have found the PBP to be especially valuable. The tools...
1,025
Posted By drl
Hi. An Alternative: paste -s -d "\t\n" z1 ...
Hi.

An Alternative:
paste -s -d "\t\n" z1
producing:
Source: x.x.x.x Destination: x.x.x.x
Source: x.x.x.x Destination: x.x.x.x
Source: x.x.x.x ...
1,142
Posted By drl
Hi. echo "1C 50 A9 D3 8B B0 24 9C 14 1C 50 A9...
Hi.
echo "1C 50 A9 D3 8B B0 24 9C 14 1C 50 A9 D3 8B B0 24" |
fold -12 |
sed '2~2a\
'

producing:
1C 50 A9 D3
8B B0 24 9C

14 1C 50 A9
D3 8B B0 24


Where the GNU extension '2~2'...
2,295
Posted By drl
Hi. In solving problems, I find it most...
Hi.

In solving problems, I find it most useful to search for solutions before inventing my own. I keep a list of notes and sources for command-line-processing, posted below. You may want to...
Forum: What is on Your Mind? 07-24-2019
5,170
Posted By drl
Hi, Neo. Thanks for taking the time to...
Hi, Neo.

Thanks for taking the time to improve it -- easier to read for me ... cheers, drl
Forum: What is on Your Mind? 07-05-2019
5,170
Posted By drl
Hi, Neo. Thanks, I like it. In the last...
Hi, Neo.

Thanks, I like it. In the last frame, There were no winners ..., the type size was small and went by too quickly for me to be able to read it in one viewing ... cheers, drl
Forum: Programming 07-04-2019
5,016
Posted By drl
Also posted (and currently on hold) at scripting...
Also posted (and currently on hold) at scripting - Python script to Grep strings from input file and output in csv format - Unix & Linux Stack Exchange...
1,732
Posted By drl
Hi. I agree with bakunin's bullet list,...
Hi.

I agree with bakunin's bullet list, especially the top item: man pages. The basic course I developed and delivered had the use of manual pages as the top priority. They are not a primary...
193
Posted By drl
Hi. In command mode d$ deletes to...
Hi.

In command mode d$ deletes to end-of-line, d0 deletes to beginning of line.

They are not quite symmetrical, d$ deletes the character under the cursor, d0 does not, but my fingers got used...
1,948
Posted By drl
Hi. There is a grep work-alike written in...
Hi.

There is a grep work-alike written in perl at https://fastapi.metacpan.org/source/BDFOY/PerlPowerTools-1.013/bin/grep which implements the -w option:
-w Matches must start and end at...
3,914
Posted By drl
Hi. Not an answer, but for those who (like...
Hi.

Not an answer, but for those who (like me) have not seen or used Platypus:
Description: Platypus is a program for creating application wrappers
around scripts,...
187
Posted By drl
Hi. Using RudiC's technique for cut, also...
Hi.

Using RudiC's technique for cut, also consider diff and comm:
#!/usr/bin/env bash

# @(#) s1 Demonstrate comparison of selected fields, diff, comm.

# Utility functions:...
3,596
Posted By drl
Hi. Noting that in this specific dataset,...
Hi.

Noting that in this specific dataset, the "#" is essentially the record separator, we can add a dummy record at the top, and use some of the features of a flexible alternative sorting code...
1,651
Posted By drl
Hi. We can push the (implicit) loop down...
Hi.

We can push the (implicit) loop down into a standard command and feed it with pairs of strings from the two files. So the core of this solution is paste -> xargs, the remainder of the...
Forum: What is on Your Mind? 05-12-2019
6,893
Posted By drl
Hi, Neo. I liked it. I tried it on a...
Hi, Neo.

I liked it. I tried it on a non-extant page and it worked. I tried a link and it worked.

I think the Oooooops! text is light compared to the 404 text's size and brightness.
...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 02:37 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy