Sponsored Content
Top Forums UNIX for Dummies Questions & Answers appending running numbers on a variable Post 302465395 by jazzaddict on Friday 22nd of October 2010 10:18:13 AM
Old 10-22-2010
Quote:
Originally Posted by ctsgnb
please give more input what did you try so far ?
what do you mean by "running"?
i meant ascending numbering

e.g.

input:

Code:
10.0.0.1
10.0.0.2
10.0.0.3

output:
Code:
1. 10.0.0.1
2. 10.0.0.2
3. 10.0.0.3


Last edited by vgersh99; 10-22-2010 at 11:26 AM.. Reason: code tags, please!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

appending spaces to a variable

Hi All, I have a requirement, in which i have to append some spaces to the variable, and then send it to another function. I am new to the UNIX shell programming. Ultimately the length of the string should be 40 characters. exp: Login = "rallapalli" (length = 10) i have to append 30 spaces to... (2 Replies)
Discussion started by: rallapalli
2 Replies

2. Shell Programming and Scripting

Appending to a variable?

Hey, I'm creating a custom useradd script, and I'm giving the option to add secondary groups. Basically what I want to do is ask for the name of the group, you type in the group you want to add, it assigns that group name to the variable $sgroup. Then the scripts asks if you want add another. If... (0 Replies)
Discussion started by: paqman
0 Replies

3. Shell Programming and Scripting

appending space to variable

Hi I need to write a script where there the user enters 3 input parameter variable number the program should ask the user left or right if it is left , the number specified that many spaces should be added to the value in front of the value and saved in the samee variable itself and if it is... (5 Replies)
Discussion started by: viv1
5 Replies

4. Shell Programming and Scripting

Appending data into a variable

Hi, I would like to know if it's possible to append data into a variable, rather than into a file. Although I can write information into a temporary file in /tmp, I'd rather if possible write into a variable, as I don't like the idea that should my script fail, I'll be polluting the server with... (5 Replies)
Discussion started by: michaeltravisuk
5 Replies

5. Shell Programming and Scripting

appending zeros to numbers using awk

hi i want to append zeros to a given number ( varying digits). the total length of the output should be 10 digits. For example: 1)input is var=347 output should be NewVar=0000000347 2) input is var=123456 output should be NewVar=0000123456 i am able to acheive this using typeset... (1 Reply)
Discussion started by: somi2yoga
1 Replies

6. Shell Programming and Scripting

Appending value to variable

I have a Query! by using command cat >> file1 we can append data's to a already existing file, Similarly is it possible to append a data to a variable. Thanks in Advance!! (2 Replies)
Discussion started by: gwgreen1
2 Replies

7. UNIX for Dummies Questions & Answers

Adding a running sequence number while appending 2 files

Hi, I have to append 2 files and while appending i need to add a running sequence number (counter ) for each line at the first column. For e.g. If file x contains details as below. Tom Dick Harry Charlie and file y contains Boston Newyork LA Toledo Then the new file should... (1 Reply)
Discussion started by: kalyansid
1 Replies

8. Shell Programming and Scripting

changing and appending numbers

I have a file that looks like below but i need to add the second part to the first meaning in the part where it goes from 14 to 1 in the first column to go to 14 to 15 and the same with the right side going from 2 to 1 to go to 2 to 3. THanks 1 176.587 0.015 C 1 2 57.351 ... (4 Replies)
Discussion started by: olifu02
4 Replies

9. UNIX for Dummies Questions & Answers

Appending a column of numbers in ascending order to a text file

I have a text file where I want to append a column of numbers in ascending orders. Input: 57 abc 25 def 32 ghi 54 jkl Output:57 abc 57 abc 1 25 def 2 32 ghi 3 54 jkl 4 How do I go about doing that? Thanks! (11 Replies)
Discussion started by: evelibertine
11 Replies

10. Shell Programming and Scripting

[Solved] How to increment and add variable length numbers to a variable in a loop?

Hi All, I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
nrglbd(8ncs)															      nrglbd(8ncs)

Name
       nrglbd - non-replicating global location broker (GBL) daemon

Syntax
       /etc/ncs/nrglbd [ -version ]

Description
       The  global location broker (GLB), enables clients to locate servers on a network or internet.  The GLB database stores the locations (that
       is, the network addresses and port numbers) where server processes are running.	The GLB maintains this database and provides access to it.

       The daemon should run as a background process.  It requires no options or arguments.  A Local Location Broker daemon ( ) must be running on
       the local host when is started.

       You can run only one on a network or internet.

       On ULTRIX systems, is typically started by a line in such as the following:
       /etc/ncs/nrglbd& echo -n ' nrglbd' > /dev/console

Options
       -version  Display  the version of the Network Computing Kernel (NCK) that this belongs to but do not start the daemon.  (NCK is part of the
		 Network Computing System (NCS) on which DECrpc is based.)

Restrictions
       This section discusses the procedure to follow if the system running the is taken off-line.

       If you restart on the same system and no server on any other system changed state, all things should run as before.  If, however, an appli-
       cation tries to contact a server that is no longer running or which has different port numbers, the application will fail.  The application
       also will not see any new server registrations.

       If a copy of is not available, you must create an up to date version of the file before restarting To do so, use to query the for registra-
       tion data on every system running an DECrpcserver and then use to register all DECrpc servers with the GLB on the new host.  Then restart

See Also
       lb_admin(1ncs), llbd(8ncs)
       Guide to the Location Broker

																      nrglbd(8ncs)
All times are GMT -4. The time now is 06:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy