![]() |
|
|
|
|
|||||||
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| String Manipulation Help | shadow0001 | Shell Programming and Scripting | 4 | 03-09-2008 12:35 PM |
| string manipulation | Cactus Jack | Shell Programming and Scripting | 9 | 02-14-2008 09:14 AM |
| String Manipulation | kakashi_jet | Shell Programming and Scripting | 7 | 01-09-2007 09:25 PM |
| sed string manipulation | speedieB | Shell Programming and Scripting | 3 | 08-11-2006 11:51 AM |
| awk string manipulation | zoo591 | Shell Programming and Scripting | 2 | 08-09-2006 09:13 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
string manipulation in unix
Hi,
I have a question . I have script which gets info from db2 engine. The script is cat sample_substitute.sh CNTR_NM=`db2 -x "select CONTAINER_NAME ,usable_pages from table( SNAPSHOT_CONTAINER('TST103',-1)) as SNAPSHOT_CONTAINER, syscat.tablespaces where tablespace_name = tbspace and tbspacetype = 'D' and tbspace='TSOPS06'" ` echo ${CNTR_NM} The output is like this /dmpath/dmtiadm1/db2fs1p00/tsops06 2128 But I am trying to get the output like this '/dmpath/dmtiadm1/db2fs1p00/tsops06' 2128 i.e. the string inside the single quote. Thanks again in advance ! |
| Forum Sponsor | ||
|
|
|
|||
|
try this
Code:
db2 -x "select CONTAINER_NAME ,usable_pages from table( SNAPSHOT_CONTAINER('TST103',-1)) as SNAPSHOT_CONTAINER, syscat.tablespaces where
tablespace_name = tbspace and tbspacetype = 'D' and tbspace='TSOPS06'" | read container upages
echo "'${container}' ${upages}"
|
| Thread Tools | |
| Display Modes | |
|
|