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 derfloh 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
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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 ' {...
  4. 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"...
  5. 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...
  6. ns705

    substitute chars with some variable value

    Hi, I'm very sorry for bothering you with such simple question. The single excuse is I see Perl program at the first time in my life. Can you please help me? I have some file with records looking like: /directory/subdir/unknowndir/file I need to change this "unknowndir" with a value of some...
  7. ns705

    setting of all array elements (ksh)

    Hi, can you help me please? Is it possible to store the same value in all array elements with a single command (in ksh script)? I heard it's possible but I can't find it in my documentation. Maybe it's only my dream... Thanks in advance. N.
  8. ns705

    Variables' names

    Hi, can somebody help me please with one problem? In ksh script (AIX) I have some arrays- ar1, ar2, ar3 and so on. I have some variable (e.g. j) that can be set to 1 or 2 or 3 and so on. Depending of this index variable I should set members in ar1 or ar2 or ... So I should have something...

Part and Inventory Search

Back
Top