Search Results

Search: Posts Made By: xbin
Forum: OS X (Apple) 10-29-2018
579
Posted By wisecracker
DFT using pure ksh ONLY!
DFT using pure ksh ONLY!

Well ksh[93] now has its own DFT without the aid of AWK. The SINE, COSINE and SQRT functions are in the code directly and NOT sourced.
This is stand alone and requires...
1,182
Posted By Don Cragun
As long as you're using bash (or a 1993 or later...
As long as you're using bash (or a 1993 or later version of ksh) and not just restricting yourself to POSIX required features and assuming that the file /home/cmccabe/Desktop/list/QC/metrics.txt...
681
Posted By vgersh99
or more easily, declare response as a low-case...
or more easily, declare response as a low-case variable: typeset -l response and you don't have to permute all the possible combinations...
Forum: OS X (Apple) 09-17-2015
3,750
Posted By sea
But anyway, the * is working as expected, since...
But anyway, the * is working as expected, since you pass the full path to it, it is included in the output string.
If you want only the names of the items within that folder, you'll have to change...
1,368
Posted By Don Cragun
An error message like that usually means that...
An error message like that usually means that another process removed that file while find was walking the file hierarchy. In other words:

find used readdir() or getdents() to read a name from...
1,268
Posted By Chubler_XL
You could try something like this is bash/ksh ...
You could try something like this is bash/ksh

mode="-rwxr-x---"
v=${mode#?}
v=${v//-/0}
v=${v//[rwx]/1}
printf "%03o\n" $((2#$v))

Output:
750

Have you considered special file...
6,369
Posted By derekludwig
XBin, Shouldn't the regex be: ...
XBin,
Shouldn't the regex be:
/-[^-]*-[^-]*-/which matches a line with more than two -s?
3,201
Posted By gull04
Hi, You don't say what your flavour of Unix...
Hi,

You don't say what your flavour of Unix is, however all you should have to do is;

vi /etc/crontab

And change the MAILTO variable to the destination required. Then all that should be...
7,159
Posted By alister
Your sed is failing because most sed...
Your sed is failing because most sed implementations do not support the \n escape sequence in the replacement text of the substitution command.

A couple of simple, portable alternatives:
sed...
1,987
Posted By Don Cragun
There was a major difference in the behavior of...
There was a major difference in the behavior of the echo utility (or shell built-in) between 4.2BSD (from the University of California, Berkeley) and UNIX System V (from AT&T Bell Laboratories). In...
1,715
Posted By pamu
Hi, your scripts works perfect here. Just...
Hi, your scripts works perfect here.

Just check if you are running your script at correct path or not.

i have tried it

$ cat test1
asdsadasd

$ cat test2
445dfsf
sdfdsfsd
sfsdf

$...
1,754
Posted By radoulov
Perl: perl -e' for (glob "[0-9-]*") { ...
Perl:
perl -e'
for (glob "[0-9-]*") {
($fn = $_) =~ s/^[\s\d-]+//;
rename $_, $fn unless -f $fn
}'KornShell:

for f in +([ 0-9-])*; do
[ -f "${f##+([ 0-9-])}" ] ||
mv --...
Showing results 1 to 12 of 12

 

Featured Tech Videos

All times are GMT -4. The time now is 07:36 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy