|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Let me put the Q directly.
I have the following set of lines in a file. 1. le.setRetryReq(CComnRqmtRetry::RETRY_EXSTNC); 2. subcpy2(retry_area,i,1,CForiAffiliationErrTyp::AFFILIATION_OTH_ERR); 3. CInteger i = CForiPosnwhichusesXfrAreaRetryTxn::AFFILIATION; Now, think that, all the above are appearing a file in 3 different lines. If u carefully observe these lines, there is a scope resolution operator "::", and to its left, there is a class name, and to its right, there is a string in CAPS. I want to extract both of these. Output can be displayed onto the desktop or to a file. Please clarify. |
|
#2
|
|||
|
|||
|
Hi
I have given the script for the input file that you have specified ------------------------------------------------------------------ le.setRetryReq(CComnRqmtRetry::RETRY_EXSTNC); subcpy2(retry_area,i,1,CForiAffiliationErrTyp::AFFILIATION_OTH_ERR); CInteger i = CForiPosnwhichusesXfrAreaRetryTxn::AFFILIATION; ------------------------------------------------------------------- save the above input file as cutx.txt and then apply my script in command prompt to get the desired output class name and class member ( Right Side string ) . awk -F" " '{print $NF}' cutx.txt | awk -F"(" '{print $NF}' | awk -F"," '{print $NF}' | sed 's/)//' | sed 's/;//' | sed 's/::/ /' Thanks Ashok_hp |
|
#3
|
|||
|
|||
|
Hi ashok,
thanks for responding. i got the required output from ur script. can u send me ur mail id. We can be in touch. my id is <thalloory_s@hotmaill.com> |
|
#4
|
|||
|
|||
|
Sorry, i mentioned my mail id wrongly. Spelling of hotmail is incorrect.
its <thalloory_s@hotmail.com> |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Doubt in Unix Scripting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|