Sponsored Content
Top Forums Shell Programming and Scripting shell script to change ip addess to 0.0.0.0 from 172.29.1.1 to 17.29.2.245 Post 302330516 by vidyadhar85 on Wednesday 1st of July 2009 01:23:42 PM
Old 07-01-2009
use this sed
Code:
sed 's/\(172\.29\.[0-9]*\.[0-9]*\)\(.*\)/0.0.0.0\2/g' filename

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Change Password In A Shell Script

Hi All, I have a problem. I need to write a shell script to change the password. The user may want to change his own password by this script. He will have to provide the required 3 parameters i.e. old password, new password and retype new password as arguments in command line. like,... (6 Replies)
Discussion started by: pintu_asim
6 Replies

2. Post Here to Contact Site Administrators and Moderators

Received all post on my mail addess

Hi neo, I am a resistered member of Forum. I want to received all post which posted by all members via mail address. Can this possible to me??? Can i receive all posts?? Thanks Yogesh Goyal (0 Replies)
Discussion started by: yogesh goyal
0 Replies

3. Shell Programming and Scripting

Shell script to change a value

I have a shell script that has following entry. MEM_ARGS="-Xms256m -Xmx512m" export MEM_ARGS if ; then if ; then MEM_DEV_ARGS="-XX:CompileThreshold=8000 -XX:PermSize=48m " export MEM_DEV_ARGS fi fi # Had to have a separate test here... (3 Replies)
Discussion started by: rijeshpp
3 Replies

4. Shell Programming and Scripting

Change the Windows Batch script to UNIX shell script.

Hi, When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script... Script: REM :: File Name : Refresh_OTL.bat REM :: Parameters : %1 - Region REM :: : %2 - Cube Type REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies

5. Shell Programming and Scripting

Shell Script to change a user password using script

Hi Experts, I had tried to executes this script to change the user password through script: No lines in buffer #!/bin/ksh cat /etc/passwd | grep -v userid >> /tmp/pass.tmp1 cat /etc/passwd | grep userid >> /tmp/pass.tmp2 PASS1=`cat /tmp/pass.tmp2 | cut -d ":" -f2` PASS2=`q2w3e4r5` sed... (3 Replies)
Discussion started by: indrajit_renu
3 Replies

6. Shell Programming and Scripting

Change crontab from shell script

Hi All, I have scheduled a script to run every five minutes through crontab. If there is any issue with the script which may need manual intervention, I have used the mailx commands. But at the same time, I would want the cron to be disabled until the issue is resolved. Once things are fine,... (2 Replies)
Discussion started by: adi_2_chaos
2 Replies

7. Shell Programming and Scripting

Wants to change shell script into crontab

Hi friends, Actually i wrote many scripts in korn shell for time saving activity in storage domain. But every week i am spending some time for the running of script. So every Monday i wants to run my scripts automatically. So corn will be helpful according to my friend's opinion. But I don't... (5 Replies)
Discussion started by: Mahendranath
5 Replies

8. Shell Programming and Scripting

Shell script to change the ip

I am writing a simple DHCP server application that gets ip from a server at boot up ! i wrote a shell script to run the java program that obtains ip from server on another machine... The problem is when i have obtained the ip i store it in a file ! using awk i retrieve the... (1 Reply)
Discussion started by: dinesh17
1 Replies
GENDERS_TESTQUERY(3)						    LIBGENDERS						      GENDERS_TESTQUERY(3)

NAME
genders_testquery - query genders database for a set of nodes SYNOPSIS
#include <genders.h> int genders_testquery(genders_t handle, const char *node, const char *query); DESCRIPTION
genders_testquery() tests if the node pointed to by node meets the conditions specified in the query. If node is NULL, the current node is tested. Queries are based on the union, intersection, difference, or complement of genders attributes and values. The query is passed as a string through the query parameter. The set operation union is represented by two pipe symbols ('||'), intersection by two ampersand symbols ('&&'), difference by two minus symbols ('--'), and complement by a tilde ('~'). Set operations are performed left to right. Parentheses may be used to change the order of operations. A list of query examples are listed below. A NULL query retrieves all nodes from the genders database. EXAMPLES
The following are example queries that can be passed to genders_testquery(). Test if a node contains the mgmt or login attribute: "mgmt||login" Test if a node is not a login node: "all--login" Test if a node is both a login node and ntp server: "login&&ntpserv" Test if a node is not a mgmt or login node: "~(mgmt||login)" RETURN VALUES
If the node as met the conditions of the query, 1 is returned. 0 is returned if the node does not meet the conditions of the query. On error, -1 is returned, and an error code is returned in handle. The error code can be retrieved via genders_errnum(3) , and a description of the error code can be retrieved via genders_strerror(3). Error codes are defined in genders.h. ERRORS
GENDERS_ERR_NULLHANDLE The handle parameter is NULL. The genders handle must be created with genders_handle_create(3). GENDERS_ERR_NOTLOADED genders_load_data(3) has not been called to load genders data. GENDERS_ERR_PARAMETERS An incorrect parameter has been passed in. GENDERS_ERR_SYNTAX There is a syntax error in the query. GENDERS_ERR_OUTMEM malloc(3) has failed internally, system is out of memory. GENDERS_ERR_MAGIC handle has an incorrect magic number. handle does not point to a genders handle or handle has been destroyed by genders_han- dle_destroy(3). GENDERS_ERR_INTERNAL An internal system error has occurred. FILES
/usr/include/genders.h SEE ALSO
libgenders(3), genders_handle_create(3), genders_load_data(3), genders_errnum(3), genders_strerror(3) LLNL
June 2004 GENDERS_TESTQUERY(3)
All times are GMT -4. The time now is 12:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy