Sponsored Content
Top Forums Programming How to simplify this perl script to a cleaner simpler look? Post 302462521 by callyvan on Thursday 14th of October 2010 11:35:57 AM
Old 10-14-2010
it actually is making more sense now, it's all slowly coming back (been a few years off of Perl and now am asked to go through this huge script and figure it out, clean it up and add more stuff...fun!)

thanks again
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

a script to simplify the use of grep

I'm trying to write a script that simplify the use of grep utility. these are the option that I'd like to use with the script " -c -i -l -n -v". When I execute the script none of these option works. I really appreciate any idea or tips regarding this problem. here the code echo " Enter 1-7:"... (2 Replies)
Discussion started by: kemobyte
2 Replies

2. Shell Programming and Scripting

How can I simplify the script

Hi all, How can I simplify following script, Logic is to find two strings (strings are case sensitive) from a file. if ; then if ; then Group=`echo $1_hostname` fi fi Please help me on this. Regards Sudhish s. kumar (8 Replies)
Discussion started by: sudhish
8 Replies

3. Shell Programming and Scripting

Is there a simpler way to achieve this?

Hi all I have the following which is part of a larger interactive script for adding virtual hosts to Apache's configuration (it was built for non-technical administrators). I'm curious as to whether there is a simpler way of achieving the same thing. All it does is look into the... (3 Replies)
Discussion started by: mlott
3 Replies

4. Shell Programming and Scripting

simplify the script, check field match to value in a file

Hi Everyone, Below is the script, i feel there should be more simple way to do the same output, my one works, but feel not nice. like using index i feel it is slow (image my file is very large), maybe awk can do one line code? Please advice. # cat 1.txt 1 a 2 b 3 cc 4 d # cat 1.pl... (6 Replies)
Discussion started by: jimmy_y
6 Replies

5. Shell Programming and Scripting

Can I simplify this script?

Hi all, I have a script which runs every morning which clears down a series of directories. The structures of which are; /opt/feeds/failed/feed1 /opt/feeds/succeed/feed1 /opt/feeds/failed/feed2 /opt/feeds/succeed/feed2 /opt/feeds/failed/feed3 /opt/feeds/succeed/feed3 etc etc Files... (6 Replies)
Discussion started by: JayC89
6 Replies

6. What is on Your Mind?

A simpler XML tool

We've been getting a lot of XML questions lately, and I suspect it's only going to get worse better ... Normal shell utilities just can't handle it and the "proper" solutions, do-everything perl modules or things like xmlstarlet, just make my head ache. Started coding something tonight. What... (10 Replies)
Discussion started by: Corona688
10 Replies

7. Shell Programming and Scripting

Cleaner method for this if-then statement?

I have a script that runs once per month. It performs a certain task ONLY if the month is January, April, July, or October. MONTH=`date +%m` if || || || ; then do something else do a different thing fi Is there a neater way of doing it than my four separate "or" comparisons? That... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies

8. Shell Programming and Scripting

Need simpler version of these commands

Hi all, I am trying to grep a file with the word grand and get all the fields.. Then replace multiple spaces with single space and then get 8 th field and add all these numbers . I am able to do it but with so amny commands which i feel can be done in a simpler way Please let me know if... (4 Replies)
Discussion started by: Hypesslearner
4 Replies

9. Shell Programming and Scripting

A cleaner way to rearrange column

Hello, I have some tab delimited text data, index name chg_p chg_m 1 name,1 1 0 2 name,2 1 1 3 name,3 1 0 4 name,4 1 0 5 name,5 1 1 I need to duplicate the "index" column, call it "id" and insert it after the... (8 Replies)
Discussion started by: LMHmedchem
8 Replies

10. Shell Programming and Scripting

Maybe a cleaner way to generate a file?

greetings, to be clear, i have a solution but i'm wondering if anyone has a cleaner way to accomplish the following: the variable: LSB_MCPU_HOSTS='t70c7n120 16 t70c7n121 16 t70c7n122 16 t70c7n123 16 t70c7n124 16 t70c7n125 16 t70c7n126 16 t70c7n127 16 t70c7n128 16 t70c7n129 16 t70c7n130 16... (2 Replies)
Discussion started by: crimso
2 Replies
FORMS(3)						   BSD Library Functions Manual 						  FORMS(3)

NAME
field_init, field_term, form_init, form_term, set_field_init, set_field_term, set_form_init, set_form_term -- form library LIBRARY
Curses Form Library (libform, -lform) SYNOPSIS
#include <form.h> void (*)(FORM *) field_init(FORM *form); void (*)(FORM *) field_term(FORM *form); void (*)(FORM *) form_init(FORM *form); void (*)(FORM *) form_term(FORM *form); int set_field_init(FORM *form, void (*function)(FORM *)); int set_field_term(FORM *form, void (*function)(FORM *)); int set_form_init(FORM *form, void (*function)(FORM *)); int set_form_term(FORM *form, void (*function)(FORM *)); DESCRIPTION
The field_init() function returns a pointer to the function that will be called just after the current field changes and just before the form is posted, this function may be set by using the set_field_init() function. Similarly, the function field_term() will return a pointer to the function that will be called just before the current field changes and just after the form is unposted, this function pointer may be set by using the set_field_term() function. The form_init() function will return a pointer to the function that will be called just before the form is posted to the screen, this function can be set by calling the set_form_init() function. The form_term() function will return a pointer to the function that will be called just after the form is unposted from the screen, this function may be set by using the set_form_term() function. By default, the init and term function pointers are NULL. RETURN VALUES
Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following error values: E_OK The function was successful. SEE ALSO
curses(3), forms(3) NOTES
The header <form.h> automatically includes both <curses.h> and <eti.h>. BSD
January 1, 2001 BSD
All times are GMT -4. The time now is 09:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy