Thank you, Denis!
Yes, it is so.
The problem was I had to use files, not directories.
But in future I could use the technique you suggested.
Thank you a lot,
Anta
Thank you, Ygor.
I thought about something in this line.
But in this case I will should have some locking on this seqfile too. A lot of concurrent sub-process will try to read/write from it.
Anta
Thank you, Mike.
Do you think it would be more foolproof method that use srand and rand awk functions?
The problem is a lot of unique values should be created during the same second in the same shell.
And you will laugh but it is real matter - I have received a duplicate wia awk.
Maybe I am a...
Thank you a lot, jad.
It really works.
I realize I'm becoming impudent and drawing you away your work but maybe you will find a couple minutes to answer one more question please.
The problem is nobody here can answer.
Does this noclobber option means that all directions to all the creating...
I'd like to ask one more question.
Could you please help me with it?
It works great in command line.
But it does not work in script:
#!/bin/ksh
filel=/dir1/dir2/filelname
set -o noclobber > $filelname || {
echo "$filelname not created"
return 8
}
return 0
I can see that the file is...
Thank you, PHV.
Yes, something about it.
In my case the current shell is the same so $$ contains the same number.
I hope this will help me.
Thank you a lot.
Anta
Hi,
can you please help me with one question?
I need to create the files with completely unique names.
I attempted to use a PID of some command as this unique number, but it does not help - I faced with problem when the system uses the selected PID in some minutes for some other process...
Is...
Hi,
can you please help me with one question?
I need to create a file if it does not exist.
Something about:
while [[ -f "$file" ]]; do sleep 1; done
touch $file || echo "can not create $file"
But there is a little possibility that such file is created in the time gap between while and...
Thank you, Ygor.
I have attempted to act via sed in the same way.
I have seen the need value in echo cmd, but when I tried to use this value in further commands I have no seen it - only the variable name.
When I began to use some new variable:
eval VARIABLEnew\=$VARIABLE
and then use this new...
Thank you.
The problem is I can see that $VARIABLE value in echo cmd, but I have a feeling that shell (ksh) does not see it in the command:
newvar=`echo $var | awk ' { m=split($0,Ar,"rcd") } END { print Ar[2] }'`
where $var contains $VARIABLE.
It seems VARIABLE was not lost (echo outputs its...
Thank you.
The script is too large (about 40K). It includes some its parts via ". other-scripts". It contains a lot of functions.
I'm very sorry - I can not post it here.
Those code I mentioned is in one of the internal functions.
This function is on one of lowest levels. It can run in batch...
Hi,
can anybody help me please?
I have the following code:
. . .
VARIABLE=sometext
. . .
var="abcd t1-$VARIABLE-t3 -eq 0 && xyz t1-t2-t3 -lt 8"
. . .
I need to have
newvar="t1-sometext-t3 -eq 0 && xyz t1-t2-t3 -lt 8"
I attempted to do it in the following way:
newvar=`echo $var | awk ' {...
Hi,
I'm very sorry for bothering you with such simple thing.
But it seems I could not find a way between three trees.
I have a variable which contains some text, I need to know the number of some chars in this text.
For ex., var="abc lalala new xyz new". I need to know the number of "new"...
Hi,
can you please help me with one problem?
I read from some file the lines looking like
/dir1/dir2/$dirX/dir3/$dirY/filename.
$dirX and $dirX are some variables, they are passed to perl program as input parms.
In which way can I set the variable $path=the above value with substitution of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.