Sponsored Content
Full Discussion: Not getting how to write
Top Forums Shell Programming and Scripting Not getting how to write Post 302843197 by darling on Monday 12th of August 2013 10:40:32 AM
Old 08-12-2013
Code:
#!/bin/ksh
QMGR=$1
while [ -z "$QMGR" ]; do
printf "Enter QM: "
read QMGR
done
echo t | amqrfdm -m "$QMGR" > chl.txt

above one is creating file chl.txt but ouput is repeating untill mountpoint gets full.

output:
Code:
amqrfdm for v7.0
Date(2013-08-12 )Time(15.01.27)
Version(7.0.1.3)(p701-103-100813)
Product(WebSphere MQ for Solaris (SPARC platform))
#) Summary
q) Print Cluster Queues
T) Print Cluster Topics
S) Print Cluster TopicStrings
s) Print Subscriptions
m) Print Cluster Queue Managers
o) Output entire cache
a) Print Free Areas
r) Print Registrations
d) Dump Area of repository
t) Browse Transmission Queue
D) Disconnect
f) Set Filters (Off)
+) Set Details level
Enter option character Q - Quit
Channel Msgs Bytes
-------------------- ----- --------
CLUSTER1.TESTENV1.C1 3 1382
#) Summary
q) Print Cluster Queues
T) Print Cluster Topics
S) Print Cluster TopicStrings
s) Print Subscriptions
m) Print Cluster Queue Managers
o) Output entire cache
a) Print Free Areas
r) Print Registrations
d) Dump Area of repository
t) Browse Transmission Queue
D) Disconnect
f) Set Filters (Off)
+) Set Details level
Enter option character Q - Quit
Channel Msgs Bytes
-------------------- ----- --------
CLUSTER1.TESTENV1.C1 3 1382
#) Summary
q) Print Cluster Queues


I want output to show like below as well as save in a file, example

once we give QMGR (SUN) name then it should display below output only

Code:
Channel Msgs Bytes
-------------------- ----- --------
CLUSTER1.TESTENV1.C1 3 1382

it should be saved in a file and script should get closed

Last edited by Scott; 08-14-2013 at 08:58 AM.. Reason: Code tags not Quote tags
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Write RPM

Hi All, Could anyone here tell me abt RPM? How to use this? I want to write it for making a build ? also tell me how to write installation file? Thanks, Kammy (1 Reply)
Discussion started by: kjannu
1 Replies

2. Shell Programming and Scripting

how to write

hi buddies i want to write a awk script for the file like this: Aaj rootha huwa ek dost bahut yaad aaya, Achha guzra huwa kuch waqt bahut yaad aaya, Meri aankhon ke har ek ashq pe rone wala, Aaj jab aankh yeh royi to bahut yaad aaya, Jo mere dard ko seene mein chhupa leta thaa, Jo... (2 Replies)
Discussion started by: LAKSHMI NARAYAN
2 Replies

3. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

4. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

5. Programming

Write-Write on a socket

Can anyone tell what happens if each end writes at the same time on the same socket ? - if one of them issues a read() after write() has completed, will it record into the buffer what the other sent ? ex. e1 writes to e2 - - - while - - - e2 writes to e1 (at the same time) e1 read () - what... (1 Reply)
Discussion started by: gendaox
1 Replies

6. Shell Programming and Scripting

Please help me to write the script

Hi All, I have written the follwing script to take the backup of the file every day along with the date. DATE=`date +%Y%m%d` export DATE cp var/hr/hr333m.txt cp var/hr/payments/hr333m_$DATE.txt The file name as follows after taking the backup. hr333m_20110630.txt Could you... (3 Replies)
Discussion started by: ajaykumarkona
3 Replies

7. Shell Programming and Scripting

Write with a look for timestamps

hello i'm using SOX to generate a spectrogram from a wave file with the command : #sox file.wav -n spectrogram is there a way to create a spectrogram using the same command but reading file timestamps instead of the namefile.wav , since name is changing every 4 hours? (it's saved with... (2 Replies)
Discussion started by: Board27
2 Replies

8. Shell Programming and Scripting

Is it possible to write write multiple cronjobs in shellscript??

Hi All, I need the answer of below question? 1) How to write multiple cronjobs in shellscript? Is there any way or we cant write in shellscript... Regards, Priyanka (2 Replies)
Discussion started by: pspriyanka
2 Replies

9. Programming

Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug?

(Apologies for any typos.) OSX 10.12.3 AND Windows 10. This is for the serious Python experts on at least 3.5.x and above... In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly. Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies
ONECLUSTER(1)					   onecluster(1) -- manages OpenNebula clusters 				     ONECLUSTER(1)

NAME
onecluster SYNOPSIS
onecluster command [args] [options] OPTIONS
-l, --list x,y,z Selects columns to display with list command -d, --delay x Sets the delay in seconds for top command -x, --xml Show the resource in xml format -n, --numeric Do not translate user and group IDs -v, --verbose Verbose mode -h, --help Show this message -V, --version Show version and copyright information COMMANDS
o create name Creates a new Cluster o delete range|clusterid_list Deletes the given Cluster o list Lists Clusters in the pool valid options: list, delay, xml, numeric o show clusterid Shows information for the given Cluster valid options: xml o addhost clusterid hostid Adds a Host to the given Cluster o delhost clusterid hostid Deletes a Host from the given Cluster o adddatastore clusterid datastoreid Adds a Datastore to the given Cluster o deldatastore clusterid datastoreid Deletes a Datastore from the given Cluster o addvnet clusterid vnetid Adds a Virtual Network to the given Cluster o delvnet clusterid vnetid Deletes a Virtual Network from the given Cluster ARGUMENT FORMATS
o file Path to a file o range List of id's in the form 1,8..15 o text String o clusterid OpenNebula CLUSTER name or id o clusterid_list Comma-separated list of OpenNebula CLUSTER names or ids o vnetid OpenNebula VNET name or id o hostid OpenNebula HOST name or id o datastoreid OpenNebula DATASTORE name or id LICENSE
OpenNebula 3.4.1 Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 April 2012 ONECLUSTER(1)
All times are GMT -4. The time now is 06:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy