Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: ns705
  • Order by date
  1. ns705

    touch question

    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
  2. ns705

    touch question

    Thank you, Jon. Anta
  3. ns705

    "uniqueness" question

    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
  4. ns705

    "uniqueness" question

    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...
  5. ns705

    touch question

    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...
  6. ns705

    touch question

    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...
  7. ns705

    "uniqueness" question

    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
  8. ns705

    "uniqueness" question

    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...
  9. ns705

    touch question

    Thank you a lot, jad! It really helps. Anta
  10. ns705

    touch question

    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...
  11. ns705

    substitution question

    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...
  12. ns705

    substitution question

    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...
  13. ns705

    substitution question

    I'm sorry - nothing helps. Anta
  14. ns705

    substitution question

    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...
  15. ns705

    substitution question

    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 ' {...
  16. ns705

    silly awk question

    Thank you! Sure it's what I need. I'm sorry I could not find it by myself. Apparently, today is not my day. Thank you a lot. Anta
  17. ns705

    silly awk question

    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"...
  18. ns705

    is it possible to evaluate?

    Thank you, mikevh! Yes, it works, and it does what I need and what I have expected. Thank you for your help. Kind regards, Anta
  19. ns705

    is it possible to evaluate?

    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...
  20. ns705

    substitute chars with some variable value

    Duncan, thank you. It helped me. Anta

Part and Inventory Search

Back
Top