Sponsored Content
Full Discussion: reduce a string
Top Forums Shell Programming and Scripting reduce a string Post 302196672 by satish@123 on Monday 19th of May 2008 07:11:22 AM
Old 05-19-2008
Java 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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. Shell Programming and Scripting

To reduce execution time

Hi All, The below script I run daily and it consumes 2 hours approx. In this I am calling another script and executing the same twice. Is the loop below the cause for the slow process?Is it possible to finetune the program so that it runs in a much faster way? The first script: #!/bin/ksh... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

6. 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

7. Shell Programming and Scripting

How to reduce code.....

Hi All, Could some one help me to reduce the code... if then ./plist -m "$queuename" |grep $2|awk '{print $3}' >unlock.log elif then ./plist -m "$queuename" |grep $2|awk '{print $4}' >unlock.log else ./plist -m "$queuename" |grep $2|awk '{print $5}' >unlock.log . . . . ... (1 Reply)
Discussion started by: harshakusam
1 Replies

8. 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

9. Shell Programming and Scripting

Reduce the space every four hours

Hi Team, Please help me in shell script, I have a some file in Linux which I want to reduce the space every 4 hours in the form of ZIP move to other location with the help of Shell Script using with with current date. Can you please help me. Regards, Suhail (3 Replies)
Discussion started by: frsuhail001
3 Replies

10. Shell Programming and Scripting

Need to reduce the execution time

We are trying to execute below script for finding out the occurrence of a particular word in a log file Need suggestions to optimize the script. Test.log size - Approx to 500 to 600 MB $wc -l Test.log 16609852 Test.log po_numbers - 11 to 12k po's to search $more po_numbers xxx1335... (10 Replies)
Discussion started by: KumarPiyush7225
10 Replies
ethers(3)						     Library Functions Manual							 ethers(3)

NAME
ethers, ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line - Ethernet address mapping operations SYNOPSIS
#include <sys/types.h> #include <sys/socket.h> #include <net/if.h> #include <netinet/in.h> #include <netinet/if_ether.h> char * ether_ntoa(e) struct ether_addr *e; struct ether_addr * ether_aton(s) char *s; ether_ntohost(hostname, e) char *hostname; struct ether_addr *e; ether_hostton(hostname, e) char *hostname; struct ether_addr *e; ether_line(l, e, hostname) char *l; struct ether_addr *e; char *hostname; Arguments The ether_addr structure is defined in <netinet/if_ether.h> DESCRIPTION
These routines are useful for mapping 48 bit Ethernet numbers to their ASCII representations or their corresponding host names, and vice versa. The mapping is obtained from the /etc/ethers database; see ethers(4). The function ether_ntoa() converts a 48 bit Ethernet number pointed to by e to its standard ACSII representation; it returns a pointer to the ASCII string. The representation is of the form: x : x : x :x : x : x Where x is a hexadecimal number between 0 and ff. The function ether_aton() converts an ASCII string in the standard representation back to a 48 bit Ethernet number; the function returns NULL if the string cannot be scanned successfully. The function ether_ntohost() maps an Ethernet number (pointed to by e ) to its associated hostname. The string pointed to by hostname must be long enough to hold the hostname and a NULL character. The function returns zero upon success and non-zero upon failure. Inversely, the function ether_hostton() maps a hostname string to its corresponding Ethernet number; the function modifies the Ethernet number pointed to by e. The function also returns zero upon success and non-zero upon failure. The function ether_line() scans a line (pointed to by l) and sets the hostname and the Ethernet number (pointed to by e). The string pointed to by hostname must be long enough to hold the hostname and a NULL character. The function returns zero upon success and non-zero upon failure. The format of the scanned line is described by ethers(4). FILES
Database that maps Ethernet addresses to hostnames RELATED INFORMATION
Commands: rarpd(8) Files: packetfilter(7), ethers(4) delim off ethers(3)
All times are GMT -4. The time now is 01:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy