|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
Join Date: Nov 2001
Posts: 57
|
Want to do a substr in Korn shell
Hello, I am maintaining a korn shell in which I just want to substr a variable to extract year 92 from hosp. Shell doesn't seem to have substr function so I was looking for awk substr function but, awk requires an input file or command keyboard input !
my korn shell coding looks like these, I am stuck at the awk statement : #!/bin/ksh sasname=hosp92 echo $sasname year=awk '{substr($sasname,4,2)}' echo $year qa_core=qa_core${year} logargs='-log ../log/${qa_core}.log -print' echo $logargs |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|