DSMADMC Dataonly

eRogue

ADSM.ORG Member
Joined
Jul 21, 2008
Messages
27
Reaction score
0
Points
0
Location
Toronto
Guys, is there a way one can retrieve only the result of a select without all the tsm client info ? What i would like is to drop these lines from the output of the command...

IBM Tivoli Storage Manager
Command Line Administrative Interface - Version 6, Release 2, Level 0.0
(c) Copyright by IBM Corporation and other(s) 1990, 2010. All Rights Reserved.
Session established with server @@@@@@: AIX
Server Version 6, Release 2, Level 3.0
Server date/time: 06/24/13 14:10:11 Last access: 06/24/13 14:05:25
ANS8000I Server command: 'select a.node_name,b.contact,c.server_name .............'


so basically, i just want to see the output of the sql query without all the noise when running dsmadmc -se= -pa= -id= -comma "select xxxxxx" > file.txt
 
remove 10 firstlines + 2 last lines
cat file.txt | tail -n +10 | sed '$d' | sed '$d' > final.file.txt
 
-dataonly=no ==> keep column header + data ... and remove "noise"
remove 10 firstlines + 2 last lines
cat file.txt | tail -n +10 | sed '$d' | sed '$d' > final.file.txt
 
If you use "-outfile=file.txt" instead of "> file.txt", it works fine. The client version is displayed regardless on screen, so if you redirect, you also get it. Howerver, if you use -outfile, you just get the output.

Do this for a .CSV file
Code:
dsmadmc -se= -pa= -id= -comma -outfile=file.csv -dataonly=yes "select xxxxxx"
or this for a text file:
Code:
dsmadmc -se= -pa= -id= -tab -outfile=file.txt -dataonly=yes "select xxxxxx"
 
Back
Top