Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.10 seconds.
Search: Posts Made By: DGPickett
Forum: Shell Programming and Scripting Linux 02-01-2016
Replies: 5
Views: 471
Posted By DGPickett
No, this just applies to the subshell of the...

No, this just applies to the subshell of the (...). Here is another example, with first page of screen output:

$ (cd GnuCash ; find * -type f|while read f; do fi [ ! -s ~/GnuCash2/"$f" ]thencp...
Forum: Shell Programming and Scripting Linux 02-01-2016
Replies: 5
Views: 471
Posted By DGPickett
Bash $(...) DISPLAYS EVERY COMMAND

I use things like this a lot in ksh and bash, but lately bash has been printing the command for every loop:
... | while read f
do
if [ "$(cmp $f xx/$f 2>&1)" = "" ]
then
echo Differ "$f"
fi...
Forum: SCO Linux 02-17-2015
Replies: 10
Views: 2,304
Posted By DGPickett
Maybe you could just change the time zone $TZ to...

Maybe you could just change the time zone $TZ to get your different dates?
Forum: IP Networking Linux 02-17-2015
Replies: 3
Views: 1,213
Posted By DGPickett
Yiou can tunnel the local browser to the remote...

Yiou can tunnel the local browser to the remote host, too, usung ssh.
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 7
Views: 1,025
Posted By DGPickett
Seems simpler in sed:sed ' /^EXIT$/{ ${...

Seems simpler in sed:sed '
/^EXIT$/{
${
s/$/\
:JCWPROD/
b
}
N
/\n:JCWPROD/b
s/.*\n/&:JCWPROD\
Forum: UNIX for Dummies Questions & Answers Linux 02-17-2015
Replies: 8
Views: 809
Posted By DGPickett
Save testing, delete earlier:sed '/^0*$/!h ; $!d...

Save testing, delete earlier:sed '/^0*$/!h ; $!d ; g' file
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 8
Views: 964
Posted By DGPickett
Some versions or 'tr' insist on char sets in and...

Some versions or 'tr' insist on char sets in and out in square brackets, probably a POSIX thing. You could 'tr' both ' ' and ',' to '\n' or 'tr' ',' to '\n' and then "tr -d ' '". The 'tr' is very...
Forum: SCO Linux 02-17-2015
Replies: 10
Views: 2,304
Posted By DGPickett
Change the date on a reboot, so the entire system...

Change the date on a reboot, so the entire system is quiescent (still one session), perhaps with an init script?
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 15
Linux ksh
Views: 1,516
Posted By DGPickett
The ksh can tell you version if you have command...

The ksh can tell you version if you have command line editing (set -o vi or emacs) by typing escape + ctrl-V. Some systems have an enhanced ksh93 as dtksh (in the CDE package) or the like, even if...
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 7
Views: 1,375
Posted By DGPickett
Doing date delta can be done in many languages,...

Doing date delta can be done in many languages, but for shell the easiest is the GNU date (which you can add to your system, perhaps as a user local executable) or you can search here for my tool...
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 17
Views: 2,054
Posted By DGPickett
Bold is pretty terminal specific, and done in the...

Bold is pretty terminal specific, and done in the presentation layer. Always design presentation on the end, after the data is parsed. Do you really want the shell to be the presentation tool? ...
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 8
Views: 964
Posted By DGPickett
My choice would be sed, but the 'tr -s' solution...

My choice would be sed, but the 'tr -s' solution is neat if you have it.
sed '
s/, */\
/g
' in_file >out_file
Forum: UNIX for Dummies Questions & Answers Linux 02-17-2015
Replies: 24
Views: 3,823
Posted By DGPickett
Maybe this would work better. I used its more...

Maybe this would work better. I used its more primitive cousin '-o' on old tar. Sometimes ids do not match up between systems, and root ownership is not desirable:
--owner=NAME
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 6
Views: 800
Posted By DGPickett
Even with ERE, you need to run it twice, perhaps...

Even with ERE, you need to run it twice, perhaps conditionally if the first hits, as you used both start and end field '|'. Otherwise, you miss the following adjacent fields on a line like:...
Forum: Shell Programming and Scripting Linux 02-17-2015
Replies: 3
Views: 631
Posted By DGPickett
Keep it basic:while read var1 var2 do ...

Keep it basic:while read var1 var2
do
another_command # This will find var1 and var2 in its environment.
done < in_file
Forum: UNIX for Dummies Questions & Answers Linux 02-17-2015
Replies: 3
Views: 735
Posted By DGPickett
You can pick a replacement separator character or...

You can pick a replacement separator character or create the directory . . . .
Forum: UNIX for Dummies Questions & Answers Linux 02-17-2015
Replies: 8
Views: 2,161
Posted By DGPickett
Writing Requirements pays better than Coding . ....

Writing Requirements pays better than Coding . . . . :D
Forum: UNIX for Dummies Questions & Answers Linux 02-17-2015
Replies: 5
Views: 707
Posted By DGPickett
Can we see example desired output?

Can we see example desired output?
Forum: HP-UX Linux 02-17-2015
Replies: 6
Views: 1,858
Posted By DGPickett
PS: Used/Free memory in a VM system is pretty...

PS: Used/Free memory in a VM system is pretty meaningless. Once a system goes quiescent, the free memory just represents recent proceess terminations, which make a bunch of free pages. Pages may be...
Forum: SCO Linux 02-16-2015
Replies: 10
Views: 2,304
Posted By DGPickett
Sudden adjustments in the clock mean that timers...

Sudden adjustments in the clock mean that timers can instantly expire invalidly. Some time adjustment programs move the time gradually to the desired time so there is no disruption. In this...
Forum: UNIX for Advanced & Expert Users Linux 02-13-2015
Replies: 12
Views: 1,833
Posted By DGPickett
You can put gnu date anywhere and call it when...

You can put gnu date anywhere and call it when you need yesterday, no configuration or other system level change.
Forum: UNIX for Advanced & Expert Users Linux 02-13-2015
Replies: 12
Views: 1,833
Posted By DGPickett
Well, 'date' is just a program file, you can get...

Well, 'date' is just a program file, you can get a Gnu date and call it gdate or by path.

I wrote tm2tm as a more task oriented tool than date, not cluttered with clock setting. It is easy to...
Forum: Shell Programming and Scripting Linux 02-13-2015
Replies: 1
Views: 503
Posted By DGPickett
Are the values fractional nn.nnnnnn, so they need...

Are the values fractional nn.nnnnnn, so they need to be truncated to int before counting? I assume they are in text, being space and line separated. Examples are nice. Still, with x and y ranges of...
Forum: Shell Programming and Scripting Linux 02-13-2015
Replies: 4
Views: 823
Posted By DGPickett
If lines of text, practically the essence of...

If lines of text, practically the essence of 'split': https://www.unix.com/man-page/linux/1/split/
Forum: Shell Programming and Scripting Linux 02-13-2015
Replies: 30
Views: 3,483
Posted By DGPickett
Tons of compile time for JAVA, apparently! :D ...

Tons of compile time for JAVA, apparently! :D

Is ther a Python hacker in the house? Can Ruby do this?
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 06:27 AM.