Sponsored Content
Top Forums Shell Programming and Scripting substitute the starting dollar sign in command with blank Post 302506864 by swethakast on Tuesday 22nd of March 2011 06:53:48 AM
Old 03-22-2011
Thanks for replaying....

but here i want in expect script..where "sed" cannot accepted by expect
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Substitute Command in vi

How do I substitute a word throughout a file? For example change all instances of the word John to Mark. This would be in vi for korn shell. (10 Replies)
Discussion started by: lesstjm
10 Replies

2. Shell Programming and Scripting

Sign on/Sign off logging script

I'd like to make a script that I can execute every time I sign on to my linux box that keeps track of the time and allows to me to add a remark to a file. So basically once I log in, I run the script, and it outputs the date and time to a text file (log.txt). But that isn't my problem. I need... (1 Reply)
Discussion started by: Glider
1 Replies

3. Shell Programming and Scripting

howto substitute word in vi command mode

Hi I'm trying to substitute word "January" with word "March" in my script but in certain lines only. I have couple words containing pattern that I want to substitute e.g. - log.January.1.array - log_January_1_array_1 - log.January.1.array - log_January_1_array_11 Trying to do cmd below... (9 Replies)
Discussion started by: presul
9 Replies

4. Shell Programming and Scripting

String starting with blank space

Dear Masters, Need your help for this small query. I am trying to get all the strings that starts with a blank space as output. Limitation is , it should be done only through AWK. Input will be: aa _1bbb c-ccc ddd eeeee ff Output should be: _1bbb c-ccc eeee ff (5 Replies)
Discussion started by: patric2326
5 Replies

5. Shell Programming and Scripting

[Solved] cp command with dollar variable in ksh

hi, I have been trying to acheive the following task for a while now, but failed.. Need help, experts please help! This is what I am trying to do: - I am writing to a flat file the name of the source to be copied and the destination path as to where it is to be copied to. Sample flat file:... (7 Replies)
Discussion started by: abdulhusein
7 Replies

6. Shell Programming and Scripting

sed substitute command -- need help

I am trying to do what I thought should be a simple substitution, but I can't get it to work. File: Desire output: I thought I'd start with a sed command to remove the part of the header line preceding the string "comp", then go on to remove the suffix of the target string (e.g. ":3-509(-)"),... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

7. Shell Programming and Scripting

Grep and dollar command

Hello there, first of all, don't hesitate to notify me if I misbehave. I'm a newbe in the use of this site, and in unix too (in english as well :-) Well, if someone hat a little time to waste, could he explain to me this strange behavior. I'm using ksh under AIX. cdeset=$(su - db2inst1 -c... (8 Replies)
Discussion started by: skitoc
8 Replies

8. UNIX for Advanced & Expert Users

Linux dollar sign in front of directory

I'm looking at a config file with dollar signs. What do the dollar signs mean in front of a directory? dir = ./demoCA # Where everything is kept certs = $dir/certs # Where the issued certs are kept crl_dir = $dir/crl # Where the issued crl are kept new_certs_dir = $dir/newcerts # default... (1 Reply)
Discussion started by: cokedude
1 Replies

9. Shell Programming and Scripting

Substitute grep command at run time

HI I am trying to use the following code in the shell script (using grep) usage() { echo "Usage: ./$0 <file name> <interval> <pattern>" } METRICS_FILE=$1 INTERVAL=$2 PATTERN="$3" .. if then PATTERN="grep Gx" fi COUNT=`cat ${METRICS_FILE} | "${PATTERN}" |egrep... (8 Replies)
Discussion started by: asifansari
8 Replies

10. UNIX for Advanced & Expert Users

Linux expand dollar sign in single quotes

I am trying to get a dollar sign variable to be expanded in single quotes. Not sure what I am doing wrong. I have tried every way I can think of. for i in `cat file1` do for j in `cat file2` do ssh $i 'systemctl is-enabled "${j}" '; done done... (4 Replies)
Discussion started by: cokedude
4 Replies
newalias(1)						      General Commands Manual						       newalias(1)

NAME
newalias - install new elm aliases for user or system SYNOPSIS
Remarks replaces the former functionality of the command. DESCRIPTION
The command creates new alias database files from an alias text file for use by and other programs. For user aliases, this functionality can also be performed from the Alias Menu of the program (see elm(1)). Options recognizes the following option: Global. The program updates the system alias files instead of a user's alias files. Operation Without the option, updates a user's alias files, based on an input file named Upon finding the file, it creates the output files named With the option, updates the system alias files, based on an input file named Upon finding the file, it creates the output files named In either case, you need read access to the file and write access to the other files and the directory. Text File Entries Each entry in either file is expected to be in the following format: The field names are defined as follows: address-list A blank- or comma-separated list of one or more mail addresses, personal alias names, and/or group alias names. In practice, each item is tested first as an alias name. If it is not an alias name, it is assumed to be a mail address. A mail address can be in Internet form in UUCP form or in alias form (see sendmail(1M)). It can also be the name of a local mail user, which is appended with the local host name in Internet form. alias-list A blank- or comma-separated list of alias names. Each name identifies the same alias entry. An alias name can be made up of letters digits underscores dashes and periods Alias names are not case-sensitive, so and are equivalent. comment A string containing any information you wish about the entry, such as location and phone numbers. It is displayed in the Alias Menu of the program, but does not transmit it in a mail message. This field can contain any characters except an unquoted equal sign See the Quoting Characters subsection. firstname The first name of the person (or group). It is combined with lastname to form the fullname. This field can contain any characters except an unquoted equal sign or an unquoted comma See the Quoting Characters subsection. The only first name under the Personal or Group Aliases subheading below is: in lastname The last name of the person (or group). It is combined with firstname to form the fullname. This field can contain any characters except an unquoted equal sign an unquoted semicolon or an unquoted comma See the Quoting Characters subsection. The last names under the Personal or Group Aliases subheading below are: and fullname The combination of firstname lastname. It is usually sent in a mail header in parentheses after the address. It is also displayed in the Alias Menu of the program and by the command (see elm(1) and elmalias(1)). The delimiters have the following precedence: o The first and second equal signs mark the end of the alias-list and the beginning of the address-list, respectively. Both equal signs are required. o The first comma after the first equal sign and before the second equal sign marks the beginning of the comment field. o The first semicolon after the first equal sign and before the next comma or second equal sign marks the beginning of the firstname field. A personal or individual alias has only one address in address-list, as in: A group alias has two or more addresses in address-list, as in: Entries can be continued over several lines; the continuation lines must start with a blank (a space or tab). A comment is any line starting with a number sign It is ignored. Blank lines and comments can be interspersed within entries. Quoting Characters You can include normally excluded characters in firstname, lastname, comment, and mail addresses in address-list by escaping each character with a backslash or by enclosing the string in quotation marks ("). To include a quotation mark or a backslash, escape it with a back- slash, whether inside or outside quotation marks. FILES
User alias database data table User alias database directory table User alias database hash table User alias source text System alias database data table System alias database directory table System alias database hash table System alias source text AUTHOR
was developed by HP. SEE ALSO
elm(1), elmalias(1), mail(1), mailx(1). newalias(1)
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy