Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extract variable name in a string Post 302879387 by maturix on Thursday 12th of December 2013 08:43:14 AM
Old 12-12-2013
no I don't want to modify the master_script (which is used in my prod).
I need to do a new script which read master_script.sh and which displays all the scripts called by it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extract from string variable into new variables

I have a variable which consists of a string like this: 001 aaabc 44 a bbb12 How do I extract each substring, delimited by the spaces, into new variables - one for each substring? eg var1 will be 001, var2 will be aaabc, var3 will be 44, var4 will be a, etc? I've come up with this:... (2 Replies)
Discussion started by: Sniper Pixie
2 Replies

2. Shell Programming and Scripting

How to extract variable number from a String

hi,I am new to shell script,I have String,like this: Number of rows exported: 5321 the numbe at end could changing,how can I extract this number and assign it to a variable,then use it later in script. thanks. (19 Replies)
Discussion started by: vitesse
19 Replies

3. UNIX for Dummies Questions & Answers

Using GREP to extract variable following a string

Hello, I'm running calculations and I need to extract a specific number from a output file. So far I've only been able to GREP entire lines containing the string: '1 F=' . I would like to go a step further and extract just the number following '1 F='. The entire line looks like: 1 F=... (10 Replies)
Discussion started by: modey3
10 Replies

4. Shell Programming and Scripting

Search for string in a file and extract another string to a variable

Hi, guys. I have one question: I need to search for a string in a file, and then extract another string from the file and assign it to a variable. For example: the contents of the file (group) is below: ... ftp:x:23: mail:x:34 ... testing:x:2001 sales:x:2002 development:x:2003 ...... (6 Replies)
Discussion started by: daikeyang
6 Replies

5. Shell Programming and Scripting

sub-string extract between variable delimiters

I need to extract certain pieces from a string, wher delimiters may vary. For example A0 B0 C0 12345677 X0 Y0 Z0 A1-B1 C1 12345678 X1 Y0 Z0 A1/B2 C77 12345679 X2 Y0 Z0 I need to get C0 12345677 X0 C1 12345678 X1 C77 12345679 X2 I tried sed, see example below: echo 'A0 B0... (2 Replies)
Discussion started by: migurus
2 Replies

6. Shell Programming and Scripting

sed - extract string before "/" from variable- linux 2.6.9-89

Hi, I have a FTP script which gets called from a wrapper script that exports a variable having value as: "/export/home/dips/logs/dipsSFTP_file1.log.YYYYMMDDHHMISS". I want to extract the file name "dipsSFTP_file1.log.YYYYMMDDHHMISS" and the dir path "/export/home/dips/logs/" from this... (4 Replies)
Discussion started by: dips_ag
4 Replies

7. Shell Programming and Scripting

to extract string from main string and string comparison

continuing from my previous post, whose link is given below as a reference https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569 consider there is create table commands in a file for eg: CREATE TABLE `Blahblahblah` ( `id` int(11) NOT NULL... (2 Replies)
Discussion started by: vivek d r
2 Replies

8. Shell Programming and Scripting

Search for string in a file, extract two another strings and concatenate to a variable

I have a file with <suit:run date="Trump Tue 06/19/2012 11:41 AM EDT" machine="garg-ln" build="19921" level="beta" release="6.1.5" os="Linux"> Need to find word "build" then extract build number, which is 19921 also release number, which is 6.1.5 then concatenate them to one variable as... (6 Replies)
Discussion started by: garg
6 Replies

9. Shell Programming and Scripting

Extract a string from a file and store it in variable

Hi, I've a file ImageSizeDetails.txt with the following contents: Image Name: swncd 01.10.00.04 Created: Wed Jan 9 14:05:48 2013 Image Type: ARM Linux Multi-File Image (gzip compressed) Data Size: 7351011 Bytes = 7178.72 kB = 7.01 MB Load Address: 00008000 Entry Point: ... (6 Replies)
Discussion started by: Parameswaran
6 Replies

10. Shell Programming and Scripting

Search String and extract few lines under the searched string

Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed Bold letters are the stations . The whole file has multiple stations . Below example i wanted to search... (4 Replies)
Discussion started by: ajayram_arya
4 Replies
ris(8)							      System Manager's Manual							    ris(8)

NAME
ris - Remote installation services (RIS) utility SYNOPSIS
/usr/sbin/ris /usr/sbin/ris -a client -h hwaddr [-i profset] -p path,prod[,prod]... [-t nettype] /usr/sbin/ris -l /usr/sbin/ris -m client [-h hwaddr] [-i profset] [-p path,prod[,prod]...] [-t nettype] /usr/sbin/ris -r client /usr/sbin/ris -s OPTIONS
Invoke the ris utility without arguments to display the RIS Utility Main Menu and start an interactive session. Refer to the DESCRIPTION section for more information. Use the -h option to specify the RIS client's hardware network address in the form xx-xx-xx-xx-xx-xx, where x is a hexadecimal character. The -h option is mandatory with the -a operand and optional with the -m operand. Use the -i option to spec- ify an installation profile set to use when you install software from a RIS area onto a RIS client. The -i option is optional with the -a and -m operands. Use the -p option to specify the RIS area and one or more comma-separated products (prod) that the RIS client is autho- rized to install from the RIS server. The -p option is mandatory with the -a operand and optional with the -m operand. Use risN.arch to specify the RIS area (path), where N is an integer (0 or higher) indicating an existing RIS area on your RIS server, and arch is the system architecture, such as alpha. For example, ris2.alpha specifies a RIS area. One or more products (prod) are specified as product_N, where N is an integer (1 or higher) indicating a software product that you have installed in a RIS area on your server. For example, product_1 specifies a RIS area. Use the -t option to specify the network type nettype. Valid values are ethernet and ieee802 (token ring). The -t option is optional with the -a and -m operands. OPERANDS
client -h hwaddr [-i profset] -p path,prod[,prod]... [-t nettype] Adds a RIS client. The client argument is the network-recognized host name of the RIS client. List registered RIS clients. client [-h hwaddr] [-i profset] [path,prod[,prod]...] [-t nettype] Modifies a RIS client. The client argument is the network-recognized host name of the RIS client. Removes a RIS client. The client argument is the network-recognized host name of the RIS client. Shows software products in RIS environments. DESCRIPTION
The ris utility manages remote installation services (RIS), letting you install software from a RIS server over a TCP/IP local area network to a RIS client. You can install the base operating system or optional products with the ris utility. You also can add, list, modify and delete RIS clients, and install, show, and delete software products in RIS areas. Refer to the RESTRICTIONS section for more information. With no arguments, the /usr/sbin/ris command displays the RIS Utility Main Menu for an interactive RIS session. # /usr/sbin/ris *** RIS Utility Main Menu *** a) ADD a client d) DELETE software products i) INSTALL software products l) LIST registered clients m) MODIFY a client r) REMOVE a client s) SHOW software products in remote installation environments x) EXIT Enter your choice: Available menu options depend upon previous actions, and choices not preceded by key letters are not available. For example, you cannot list, modify, or remove clients until you add a RIS client. In that case, the m, l, and r key letters are not displayed in front of their respective options, as shown in the following example: *** RIS Utility Main Menu *** a) ADD a client d) DELETE software products i) INSTALL software products ) LIST registered clients ) MODIFY a client ) REMOVE a client s) SHOW software products in remote installation environments x) EXIT Enter your choice: The ris utility uses the /usr/var/adm/ris directory as a base. When you install the first software product, the ris utility creates a RIS area on the disk. RIS areas are named risN.arch, where N is a sequentially-assigned integer starting with 0, and arch identifies the client's machine architecture, such as alpha. The first RIS area for Alpha clients is named ris0.alpha. Additional areas can be set up for the same architecture or other client architectures for organizational or performance reasons. A RIS area contains one or more software products. Each product includes software subsets that can be installed on authorized RIS clients over a local area network. Once software products are installed into a RIS area, RIS clients registered for that RIS area can use the setld utility over the network to install software from their RIS area. You must use the ris utility interactively to set up a RIS area. After you set up a RIS area on the RIS server, you can use the -a, -l, -m, -r, and -s command line operands to manage RIS clients and display information. The ris utility uses the /usr/var/adm/ris/clients/risdb database file to manage multiple clients. RESTRICTIONS
Tru64 UNIX RIS servers cannot install the base operating system on RIS clients that do not support the BOOTP Internet Boot Protocol. EXAMPLES
Invoke the ris utility with no arguments to start an interactive session: # /usr/sbin/ris *** RIS Utility Main Menu *** Choices without key letters are not available. a) ADD a client d) DELETE software products i) INSTALL software products l) LIST registered clients m) MODIFY a client r) REMOVE a client s) SHOW software products in remote installation environments x) EXIT Enter your choice: You must use an interactive session to install or delete software products. After a RIS area is set up on the RIS server, you can use the -a, -l, -m, -r, and -s command line operands to manage RIS clients and display information. The following examples show how to use command line arguments to manage a client named stlouis. These examples assume that /usr/sbin is in your path. Backslashes () indicate line continuation and are not part of the command syntax. Adding a RIS Client Use the following syntax to add a RIS client: ris -a client -h addr -p path,prod[,prod][,prod]... Add RIS client stlouis and allow that client to install a product over the network: # ris -a stlouis -h xx-xx-xx-xx-xx-xx -p ris0.alpha,product_1 Modifying a RIS Client Use the following syntax to modify a RIS client: ris -m client [-h addr] [-ppath,prod[,prod][,prod]...] Modify RIS client stlouis and allow it to install an additional product over the network: # ris -m stlouis -p ris0.alpha,product_2 Removing a RIS Client Use the following syntax to remove a RIS client: ris -r client Remove RIS client stlouis: # ris -r stlouis FILES
Base directory for remote installation areas Directory for database Remote installation information database Directory containing configu- ration description files (CDF) used for installation cloning. SEE ALSO
Commands: setld(8), bootpd(8) Sharing Software on a Local Area Network Installation Guide Installation Guide -- Advanced Topics ris(8)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy