Sponsored Content
Top Forums Shell Programming and Scripting Deleting a word from a string Post 302713695 by elixir_sinari on Thursday 11th of October 2012 06:04:10 AM
Old 10-11-2012
Code:
echo ' /LDCA20/rel/prod/libina.a'|sed '/libina\.a$/s///'
 /LDCA20/rel/prod/

This User Gave Thanks to elixir_sinari For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

deleting last characters of a word

Hi All is there a way to delete last n characters from a word like say i have employee_new i want to delete _new. and just get only employee I want this in AIX Shell scripting Thanks (3 Replies)
Discussion started by: rajaryan4545
3 Replies

2. UNIX for Dummies Questions & Answers

deleting word from this point to end of file in VI

Hi All i need to delete a recurring word from point "n" till end of the file. there are other words in this file so i cannot use `dG`, can anyone help me out? Kind regards Brian (4 Replies)
Discussion started by: brian112
4 Replies

3. Shell Programming and Scripting

deleting lines above and below a word!

i jst want to delete a host entry from httpd.conf for eg: i have entries such as: <VirtualHost 192.168.1.157:80> DocumentRoot /home/karthik ServerName kar </VirtualHost> <VirtualHost 192.168.1.157:80> DocumentRoot /home/karthik1 ServerName www </VirtualHost> <VirtualHost... (4 Replies)
Discussion started by: jacky29
4 Replies

4. Shell Programming and Scripting

sed - deleting each line up to a word

Hi there, I'd like to delete the beginning of a line up until it finds a certain word or character string: in this case, I'd like to delete each line up to the word "mounting". Thanks ;) Susan (12 Replies)
Discussion started by: kitykity
12 Replies

5. Shell Programming and Scripting

grep part of word or Another word from a string

Hi all, FileOne family balance >>>>> 0 0 0 0 java.io.FileNotFoundException: Settings.xml (No such file or directory) at java.io.FileInputStream.open(Native Method) .. .... ..... ..... java.lang.NullPointerException ... ..... ...... Stacktrace: at... (2 Replies)
Discussion started by: linuxadmin
2 Replies

6. Shell Programming and Scripting

Replace a word in a string starting with another word

Hi All, I have a file in which a number of lines are starting with similar first word but different next words. I want to replace the any nth word(not 1st or 2nd) with another word. Eg:- My file contains are like this:- Ram is a boy. Ram is a good boy. Ram plays cricket. Here I want to... (2 Replies)
Discussion started by: mukeshbaranwal
2 Replies

7. Shell Programming and Scripting

Deleting part of a string : string manipulation

i have something like this... echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }' Certifica the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it. expected output is Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies

8. Shell Programming and Scripting

Deleting rows starting with a character and word

Hi, I have multiple files of same format and I want to delete the lines starting with # and The from all of them I am using egrep -v '^(#|$)' for # but unable to do for both # and The Please guide Thanks (12 Replies)
Discussion started by: bioinfo
12 Replies

9. Shell Programming and Scripting

Deleting lines in a fixed length file where there is a word at specific location

I have a big file having 100 K lines. I have to read each line and see at 356 character position whethere there is a word "W" in it. If it is their then don't delete the line otherwise delete it. There are two lines as one Header and one trailer which should remain same. Can somebody... (5 Replies)
Discussion started by: mohit kanoongo
5 Replies

10. Shell Programming and Scripting

Using sed for deleting the first word of each line?

sed /'1-2'/&^/ filename suppose there is a file containing three lines , how do we do delete the word from each line? hyter efr frf rerfer efe ewd cdcf evrfgf erfv the output has to look like frf ewd erfv (2 Replies)
Discussion started by: Rajeev Nukala
2 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 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy