Sponsored Content
Top Forums UNIX for Dummies Questions & Answers plz help deliverable unix masters Post 302255833 by otheus on Friday 7th of November 2008 08:23:43 AM
Old 11-07-2008
Code:
read replacestring <file2
sed -i 's/^CNT=[0-9]*$/CNT='$replacestring'/' file1

Be careful that replacestring (in file2) does not have any special characters in it, like backslashes.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies

2. UNIX for Dummies Questions & Answers

Unix masters please help newbie on "find" command

please help me figure out how to do this I wont lie, this is for a homework problem and I have searched on google for a long time and still can't figure out what to do. here is the problem So there's a folder let's say called "bare" in it, there are 10 dirs with names from "part1" through... (2 Replies)
Discussion started by: white_raven0
2 Replies

3. Shell Programming and Scripting

UNIX script problem ..Plz help ASAP

Hi folks, I have written down a UNIX script which actually FTP the file to other server. What is happening now , this script is not working only for 1 server , as it is working for 32 different FTP server . In this particular server , we are getting message “FTp:550 access denied”... (1 Reply)
Discussion started by: khan1978
1 Replies

4. Post Here to Contact Site Administrators and Moderators

Please help Moderators. Unix Masters.

Hi Vgersh, I have a quick problem that needs to be solved as soon as possible. I am using a script written by Reborg for doing a file manipulation on files. The script is in the posted forum with title "Script not working as desired". It was working fine but I have a strange situation where... (0 Replies)
Discussion started by: mhssatya
0 Replies

5. UNIX for Dummies Questions & Answers

Plz help me.... window split in unix

how to split a window into two using curses in a text based chat application? (0 Replies)
Discussion started by: manju
0 Replies

6. UNIX for Dummies Questions & Answers

Need Unix Terminal for practise on Rental basis ...plz help!

Hey Guys,, Have just got started with Unix , I need UNIX Terminal to practise commands. Does any website host such services ? Happy Holidays... (9 Replies)
Discussion started by: rrover1977
9 Replies

7. UNIX for Dummies Questions & Answers

unix script plz help

cdfcxvvbbvnbjmjnhjml. (1 Reply)
Discussion started by: sree11
1 Replies

8. UNIX for Dummies Questions & Answers

Basic unix command help plz

I was wondering what command lines i could use to do the following. 1. mail a file to a user with a subject line "HELLO". Also, send a Blind carbon copy to a different user? 2. Display the number of files AND directories in a given directory? 3. Display the last 5 files in a given... (4 Replies)
Discussion started by: tragic54
4 Replies

9. Shell Programming and Scripting

Very New To Unix Shell Programming:Plz Help

Hi Gurus I am very new to Unix Shell Prog. I have a file in format Q1 Dirname-FileName Score Remarks i.e. containing columns separated by space. I want to read Column 1 and 2 and then join them to make a string that would be a path to a file. I will use this string to fetch the files and... (4 Replies)
Discussion started by: kimskams80
4 Replies

10. UNIX for Dummies Questions & Answers

am a newbie to unix. plz help in understanding this code.

hi everybody. please help me in understanding this code. echo "************* starting job on `date +\"%d/%m/%Y at %T\"` **************" # scriptdir=`dirname $0` . ${scriptdir}/env_params.sh # SHLIB_PATH=${ORACLE_HOME}/lib: export SHLIB_PATH export... (1 Reply)
Discussion started by: gokulj
1 Replies
Ns_Info(3aolserver)					   AOLserver Library Procedures 				       Ns_Info(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
Ns_InfoAddress, Ns_InfoBootTime, Ns_InfoBuildDate, Ns_InfoConfigFile, Ns_InfoErrorLog, Ns_InfoHomePath, Ns_InfoHostname, Ns_InfoLabel, Ns_InfoNameOfExecutable, Ns_InfoPid, Ns_InfoPlatform, Ns_InfoServerName, Ns_InfoServerVersion, Ns_InfoServersStarted, Ns_InfoShutdownPend- ing, Ns_InfoStarted, Ns_InfoTag, Ns_InfoUptime, Ns_PageRoot - Get server information SYNOPSIS
#include "ns.h" char * Ns_InfoAddress(void) int Ns_InfoBootTime(void) char * Ns_InfoBuildDate(void) char * Ns_InfoConfigFile(void) char * Ns_InfoErrorLog(void) char * Ns_InfoHomePath(void) char * Ns_InfoHostname(void) char * Ns_InfoLabel(void) char * Ns_InfoNameOfExecutable(void) int Ns_InfoPid(void) char * Ns_InfoPlatform(void) char * Ns_InfoServerName(void) char * Ns_InfoServerVersion(void) int Ns_InfoServersStarted(void) int Ns_InfoShutdownPending(void) int Ns_InfoStarted(void) char * Ns_InfoTag(void) int Ns_InfoUptime(void) char * Ns_PageRoot(char *server) _________________________________________________________________ DESCRIPTION
These functions return information about the server. Many of the functions return pointers to strings or other types of information which, in most cases, you must not free. These are denoted as "read-only" in the sections below. Ns_InfoAddress() Return the server IP address of the server. The IP address is defined in the server configuration file. The IP address is returned as a string pointer which you must treat as read-only. If you want to alter the string, you must use ns_strdup to copy the string to another location in memory and modify that instead. Ns_InfoBootTime() Return the time that the server was started as an int. Treat the result as time_t. Ns_InfoBuildDate() Return the date and time that this server was compiled as a string pointer. Treat the result as read-only. Ns_InfoConfigFile() Return the absolute path name of the configuration file in use as a string pointer. Treat the result as read-only. Ns_InfoErrorLog() Return the name of the error log as a string pointer. Treat the result as read-only. The name may be just a name, a relative path or an absolute path depending on how it is defined in the server configuration file. Ns_InfoHomePath() Return the absolute directory path where AOLserver is installed as a string pointer. Treat the result as read-only. Ns_InfoHostname() Return the hostname of the host that AOLserver is running on as a string pointer. The gethostname(2) function is used. If gethost- name(2) fails to return a hostname, "localhost" is used instead. Treat the result as read-only. Ns_InfoLabel() Return the source code label for AOLserver as a string pointer. Statically defined in the source code. If no label was used, "unla- beled" is returned. You can use these functions to provide the source code label when you report problems with the server. Treat the result as read-only. Ns_InfoNameOfExecutable() Return the name of the running executable as a string pointer. Treat the result as read-only. Ns_InfoPid() Return the pid of the running AOLserver executable as an int. Ns_InfoPlatform() Return the platform name as a string pointer, e.g. "linux". Treat the result as read-only. Ns_InfoServerName() Return the AOLserver name string, e.g. "AOLserver". Statically defined in the source code. Treat the result as read-only. Ns_InfoServerVersion() Return the AOLserver version string, e.g. "3.5.2". Statically defined in the source code. Treat the result as read-only. Ns_InfoServersStarted() Return TRUE if the server has started, i.e., if initialization and module loading is complete. This is a compatibility function that calls Ns_InfoStarted. Ns_InfoShutdownPending() Return TRUE if there is there a shutdown pending, i.e. if an INTR signal has been received or if ns_shutdown has been called. Ns_InfoStarted() Return TRUE if the server has started, i.e., if initialization and module loading is complete. Ns_InfoTag() Return the CVS tag of this build of AOLserver. Statically defined in the source code. The value may be meaningless. Treat the result as read-only. Ns_InfoUptime() Return how long, in seconds, AOLserver has been running. Ns_PageRoot(server) Return the path name of the AOLserver pages directory for a particular server as a string pointer. The server argument is not used. Treat the result as read-only. SEE ALSO
nsd(1), info(n) KEYWORDS
AOLserver 4.0 Ns_Info(3aolserver)
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy