Need to only remove parenthesis and : leave the rest
Hi all,
I'm stuck on this last part...am running a simple script under AIX to extract NetView host IP addresses. The line below returns the IP address in parenthesis with a trailing colon, i.e.
I'm stuck on this last part...am running a simple script under AIX to extract NetView host IP addresses. The line below returns the IP address in parenthesis with a trailing colon, i.e.
wow... this should be UUOC and UUOG^3 [among others].....
Wow, quick responses. I probably should have posted the entire source. As you can tell I'm not a coder ;-) What I need to do is run a command that dumps out the list of hostnames from a database; I then feed them through a loop that pings the hostname. I'm trying to scrape the IP address out of the result and ultimately produce a file that has hostname <tab> IP address.
for name in $HOSTNAME
do
ping -c 1 $name |grep \( | awk '{ print $3 }'
done
Right now I'm getting the IP address but need to clean out the surrounding crud! And I do realize grep and awk aren't needed on the same line. I do this so infrequently and the scripts are usually run once or maybe run daily.
The awk below works fine if I manually remove the () from file1. However, when I try to use tr to remove the () and then | into awk to run the calculation no result is obtained. Is there a way to tell the awk to ignore the () in fiile1 if they are there or do I need to remove them first? Thank... (5 Replies)
Hi,
I have files in a folder that I would like all renamed without the preceding number and parenthesis. For example, I have files of the name
08) Great Good Fine Ok - Not Going Home
09) Roosevelt - Small Hours
10) RAC - I Should've Guessed Feat. SPEAK
and I would like them all to be... (4 Replies)
how can i remove numbers of characters from the last name of file with respect to not remove the files extension
example
VFX_Official_Trailer_(HD)__Shhh__-_by_Freddy_Chavez_Olmos_&_Shervin_Shoghian-.mp4
i want to rename this to
VFX-Official-Trailer-(HD)-Shhh... (13 Replies)
Hi
I need help on this ..!!
Input :
xx_abc_regA
xx_def_regB
xx_qwe_regC
Now i required the output as the below
abc
def
qwe
Need to remove last occurrence of character (_) and rest of the string in Unix (sed).
Thanks in Advance ..!!!
-Nallachand (3 Replies)
Need to remove rest of line after the equals sign on search pattern from the searchfile. Can anybody help. Couldn't find any similar example in the forum:
infile:
64_1535: Delm. = 86 var, aaga
64_1535: Fran. = 57 ex. ccc
64_1639: Feb. = 26 (link). def
64_1817: mar. = 3/4. drz ... (7 Replies)
Hi,
I am trying to clean up data between parenthesis () in a file.
See example below....
Input File :
(New York) Chicago (London)
New York (Chicago) London
New York Chicago (London)
(New York) (Chicago) (London)
New York (Chicago)
... (3 Replies)
how do i turn on the option to check for opening and closing parenthesis in Microsoft VC++? I remember there is a setting somewhere in the options in the MS VC++ environment but not sure..
thanks (4 Replies)
Hello, i'm unable to remove the parenthesis character.
With $parsed_AsciiName =~ s/\(//;
the string is the same
And with $parsed_AsciiName =~ s/(//;
i retrieve "Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE"
Any ideas, please? thank you in advanced. (4 Replies)
just have a file
1:2333 2:-09393 ]3:45453 4:-09999 5:-09933 6:93939
question is to get output by removing colons as well as number before each colon (in bold)
2333 -09393 45453 -09999 09933 93939 (5 Replies)