How to reduce code.....


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to reduce code.....
Prev   Next
# 1  
Old 04-30-2009
How to reduce code.....

Hi All,

Could some one help me to reduce the code...

if [ $wordsize -eq 2 ]
then
./plist -m "$queuename" |grep $2|awk '{print $3}' >unlock.log
elif [ $wordsize -eq 3 ]
then
./plist -m "$queuename" |grep $2|awk '{print $4}' >unlock.log
else
./plist -m "$queuename" |grep $2|awk '{print $5}' >unlock.log
.
.
.
.

Cheers
Harsha
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Code review: recursion in circular array, reduce two functions to one?

Hello, I think there's an easier way to do this but can't seem to recall but given an array of animals and an initial value is a random index in the array, here it's 3. 3,4,5,4,3,2,1,0,1,2,3,4,5,4,3,2,1,0... inifinite repeat a quick brute force solution i came up with was two functions, i... (6 Replies)
Discussion started by: f77hack
6 Replies

2. Shell Programming and Scripting

Reduce redundant file

Dear All, I have to reduce the redundancy of a file that is like this: a b 0 a c 0 a f 1 b a 1 b a 0 b c 1 d f 0 g h 1 f d 1 Basically, this file describe a network with relative nodes and edges. The nodes are the different letters and the edges are represented by the numbers (in... (7 Replies)
Discussion started by: giuliangiuseppe
7 Replies

3. UNIX for Dummies Questions & Answers

Reduce the count on the 98 record by 2,

recod,amount,noofaccount,count 98,+00000187865779787,00319,000000640/ 99,+00000187865779787,00001,000000642/ thsi is my input file my question is 1) Reduce the count on the 98 record by 2 (6 Replies)
Discussion started by: sgoud
6 Replies

4. Shell Programming and Scripting

how to reduce a length in a file?

i want to reduce a length in the file called text in the file im having 10 byte length. want to reduce it to 9 byte length for all lines. (5 Replies)
Discussion started by: laknar
5 Replies

5. Shell Programming and Scripting

Reduce

printf "\nClosing stats:\n" >> data.txt echo >> data.txt sed 's/^ \t*//;/^#/d;/^$/d' $stats | while read line do close=$(grep -w "^$line" $datafile | sed -e 's/\(.*\),\(.*\),\(.*\)/\2/') if ; then printf "%5d. %-s was not found in file\n"... (3 Replies)
Discussion started by: jafa401
3 Replies

6. Shell Programming and Scripting

reduce a string

hi i have a string "hostname=lpdma520_dev_ipc_us_aexp_com" now i need only "newHostname=lpdma520" how to do this one please help soon (2 Replies)
Discussion started by: satish@123
2 Replies

7. UNIX for Dummies Questions & Answers

Can I reduce sysdump?

Hi, I have a server which is running out of space on the rootvg. When trying to find some spare space I discovered there are 2 sysdump logical volumes, each of 5GB, yet if I get an estimate of the dump size it's only 0.5 GB. $ lsvg -l rootvg|grep sysdump hd71 sysdump 20 ... (1 Reply)
Discussion started by: m223464
1 Replies

8. UNIX for Advanced & Expert Users

How to reduce IOWAIT in linux

Hi All, Any ideas how to reduce IOWAIT and increase disk speed on Linux server. Server has 4 CPUs and with 8GB RAM. Thanks in advance, Regards, Bache (3 Replies)
Discussion started by: bache_gowda
3 Replies

9. Shell Programming and Scripting

reduce the or conditions

Hi , how can i reduce the or conditions: if ]; then whatever fi (8 Replies)
Discussion started by: hitmansilentass
8 Replies

10. AIX

reduce available ram

hello, we have a aix 5.2 server with 8GB of ram. is it possible, without actually removing the hardware, to have the O/S think it has only 4GB of ram? We would like to see how the handles and responds if it only had 4Gb instead of the 8GB. Any ideas or suggestions? Thanks Looks like i found... (6 Replies)
Discussion started by: zuessh
6 Replies
Login or Register to Ask a Question
CARDDAVD(8)						    BSD System Manager's Manual 					       CARDDAVD(8)

NAME
carddavd -- Darwin Address Book Server Control Interface SYNOPSIS
carddavd [-hX] [-u username] [-g groupname] [-T twistd] [-f carddavd.plist] DESCRIPTION
carddavd is a front end to the Darwin Address Book Server. The Darwin Address Book Server is a web server which implements the HTTP, WebDAV, WebDAV ACL, and CardDAV protocols. carddavd is a simple tool for starting the server. OPTIONS
-h Displays usage information -X Starts the server but does not daemonize it. -u username Drops privileges to the given username. -g groupname Drops privileges to the given groupname. -f carddavd.plist Specifies the path of the configuration file to read. -T twistd Specifies the path to the twistd binary. FILES
/etc/carddavd/carddavd.plist The Address Book Server configuration file. It is an XML property list specifying server options such as the port to bind to, whether to use SSL, and the names of other configuration files. /etc/carddavd/server.pem PEM-format server keys for use with SSL. /Library/AddressBookServer/Documents The server's document root, which is used as the backing store for the HTTP resources on the server. /var/log/carddavd/access.log The server's access log file, in a format similar to Apache HTTPd's access log. /var/log/carddavd/error.log The server's main log file. /var/run/carddavd.pid The server's process ID file. /usr/share/carddavd Server implementation and support files. SEE ALSO
caldavd(8), httpd(8), serveradmin(8) STANDARDS
carddavd complies with draft-ietf-vcarddav-carddav (CardDAV), RFC 2518 (WebDAV) and RFC 3744 (WebDAV ACL). HISTORY
carddavd was first introduced as part of Darwin 10 and Mac OS 10.6. BUGS
This version of carddavd is still in development and testing. BSD
April 20, 2009 BSD