Search Results

Search: Posts Made By: xbin
Forum: OS X (Apple) 10-29-2018
6,345
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...
3,843
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...
1,704
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
6,646
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...
2,606
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...
2,760
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...
15,909
Posted By derekludwig
XBin, Shouldn't the regex be: ...
XBin,
Shouldn't the regex be:
/-[^-]*-[^-]*-/which matches a line with more than two -s?
6,056
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...
12,312
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...
3,531
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...
3,129
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

$...
2,240
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

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