02-19-2006
How to cut prefix from a string?
Hi folks,
I have the following parameter setting:
export ADMIN_HOST_NAME=http://hostname.com
I want to define a new parameter,ADMIN_HOST_NAME_NEW,which based on $ADMIN_HOST_NAME but I need to remove the prefix "http://".
The requested result for $ADMIN_HOST_NAME_NEW is hostname.com
How to cut this prefix from the parameter?
Thanks in advance,
Nir
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
Plz help me with:
I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
Discussion started by: ozzy80
9 Replies
2. Shell Programming and Scripting
Hi all,
I have a requirement where in i have to create a temporary file by prefixing a string of special characters to each row of a input file.
the input file is '|' delimited.
here is the content of input file
aaa|1234|axad|123
bbb|qwqw|qw|1334
the output should be
... (5 Replies)
Discussion started by: nvuradi
5 Replies
3. UNIX for Dummies Questions & Answers
I have a file:
chromosome1:436728
chromosome2:32892
.....
chromosome22:23781
I just want to get the number, not the prefix "chromosomeX", so I want to remove all the prefix ahead of the numbers. How can I do that?? Thanks!!! (PS: give me some very simple command so that I can understand... (4 Replies)
Discussion started by: kaixinsjtu
4 Replies
4. Shell Programming and Scripting
I have a shell script and it works pretty well to pull out the query_string contents of a single instance of router=
But if I have multiple router= strings, it only pulls out the last one.
Is there a way to pull out every router= and if there is a multple string, to egrep them together... (1 Reply)
Discussion started by: numele
1 Replies
5. Shell Programming and Scripting
Hi, I'm new about shell scripting, and I need to do something like
abcd **1234** efgh
by
abcd '''1234''' efgh
I know that command sed helps about change one string by another, but I dont know how to keep whatever is inside **_** and replace * with '.
Thanks! (5 Replies)
Discussion started by: selvaya
5 Replies
6. Shell Programming and Scripting
Possible filenames:
CDD_Whatever.txt
DDD_Whatever.txt
If the file prefix = CDD, I'd like to prefix every person ID (second column in my examples below) on the file with "c-"
If the file prefix = DDD, I'd like to prefix ever person ID with "d-"
Input:
Desired Output:
Any help... (2 Replies)
Discussion started by: lrluis
2 Replies
7. Shell Programming and Scripting
Hi in a directory i've files having the following name
for_category_info_19990101984301
for_catgry_meta_19991111214601
-------
I just want the name till year and month i.e;
for_category_info_199901
for_catgry_meta_199911
How can i achieve the above string
Thanks (2 Replies)
Discussion started by: smile689
2 Replies
8. Shell Programming and Scripting
---------- Post updated at 10:31 AM ---------- Previous update was at 10:28 AM ----------
Hello,
I am trying to get the string cut based on the following needs:
String1=Submitted request 25574824 for CONCURRENT SQLAP RUAPACTUALSEXT Y RUAPACTUALS122313100616.dat "2013/01/12 14:50:44"... (6 Replies)
Discussion started by: cartrider
6 Replies
9. Shell Programming and Scripting
Hello everyone,
I want to remove only prefix ME_ from all the values that are present in the FILEA. Below code I'm using for this.
sed 's/ME\_//g' FILEA > FILEB
Using the above code, all ME_ values are getting removed from the file. But the problem here is I want to remove only Prefix ME_... (4 Replies)
Discussion started by: ed_9
4 Replies
10. Shell Programming and Scripting
Dear All,
assume i have a file with content:
<Start>6000</Start>
<Stop>7599</Stop>
the output is:
6000
7000
7100
7200
7300
7400
7599
how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix.
Thanks
Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies
RARP(8) Linux Programmer's Manual RARP(8)
NAME
rarp - manipulate the system RARP table
SYNOPSIS
rarp [-V] [--version] [-h] [--help]
rarp -a
rarp [-v] -d hostname ...
rarp [-v] [-t type] -s hostname hw_addr
NOTE
This program is obsolete. From version 2.3, the Linux kernel no longer contains RARP support. For a replacement RARP daemon, see
ftp://ftp.dementia.org/pub/net-tools
DESCRIPTION
Rarp manipulates the kernel's RARP table in various ways. The primary options are clearing an address mapping entry and manually setting
up one. For debugging purposes, the rarp program also allows a complete dump of the RARP table.
OPTIONS
-V Display the version of RARP in use.
-v Tell the user what is going on by being verbose.
-t type
When setting or reading the RARP table, this optional parameter tells rarp which class of entries it should check for. The default
value of this parameter is ether (i.e. hardware code 0x01 for IEEE 802.3 10Mbps Ethernet . Other values might include network tech-
nologies such as AX.25 (ax25) and NET/ROM (netrom).
-a
--list Lists the entries in the RARP table.
-d hostname
--delete hostname
Remove all RARP entries for the specified host.
-s hostname hw_addr
--set hostname hw_addr
Create a RARP address mapping entry for host hostname with hardware address set to hw_addr. The format of the hardware address is
dependent on the hardware class, but for most classes one can assume that the usual presentation can be used. For the Ethernet
class, this is 6 bytes in hexadecimal, separated by colons.
WARNING
Some systems (notably older Suns) assume that the host replying to a RARP query can also provide other remote boot services. Therefore
never gratuitously add rarp entries unless you wish to meet the wrath of the network administrator.
FILES
/proc/net/rarp,
SEE ALSO
arp(8), route(8), ifconfig(8), netstat(8)
AUTHORS
Ross D. Martin, <martin@trcsun3.eas.asu.edu>
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
Phil Blundell, <Philip.Blundell@pobox.com>
net-tools 4 August 1997 RARP(8)