10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I wish to remove any word coming after searched string found in a word.
source*.txt
#!bin/bash
#test1
http://www.aa.bb.cc http://www.xx.yy http://www.11.22.44
#test2
http://www.11.rr.cd http://www.01.yy http://www.yy.22.tt
#test3
http://www.22.qq.fc http://www.0x.yy... (15 Replies)
Discussion started by: baris35
15 Replies
2. Shell Programming and Scripting
Hi Perl users,
I have another problem with text processing in Perl. I have a file below:
Linux Unix Linux Windows SUN
MACOS SUN SUN HP-AUX
I want the result below:
Unix Windows SUN
MACOS HP-AUX
so the duplicate string will be removed and also the keyword of the string on... (2 Replies)
Discussion started by: askari
2 Replies
3. Shell Programming and Scripting
Hello
I have a string that may or may not have 4 dots.
The string is actualy a file within a folder, where multiple files are located.
Files may look like:
# ls *
creds:
192.168.10.110 someserver
shares:
192.168.10.110.Public someserver.sharefolder
#
I want to fill 2 variables,... (1 Reply)
Discussion started by: sea
1 Replies
4. Shell Programming and Scripting
var=abc_cde_def_ghi_678.txt
Expected output:
cde_def_ghi_678.txt
Is there a better way to achive this other than cut command?
Basically, I need to remove the 1st word and _ from the string.
Thanks. (1 Reply)
Discussion started by: vedanta
1 Replies
5. Shell Programming and Scripting
Hello All,
I am running a command find . -name amp.cfg | cut -c 3- which gives me output something like below
rel/prod/amp.cfg
rel/fld/amp.cfg
deb/detail/amp.cfg
deb/err/amp.cfg I want to remove trailing "/amp.cfg" so that i should get output something like... (7 Replies)
Discussion started by: anand.shah
7 Replies
6. Shell Programming and Scripting
I have something a bit tricky here and not sure how to go about fixing it.
I am doing a ls on a directory to obtain a list of databases within a directory and assigning it to a string as you can see from below. The problem is there is a folder in there called apache. I do not want this to be... (3 Replies)
Discussion started by: LRoberts
3 Replies
7. Shell Programming and Scripting
Hi,
I have two strings like this in an array:
For example:
@a=("Brain aging is associated with a progressive imbalance between intracellular concentration of Reactive Oxygen Species","Brain aging is associated with a progressive imbalance between intracellular concentration of Reactive... (9 Replies)
Discussion started by: vanitham
9 Replies
8. Shell Programming and Scripting
Hi,
probably a newbie question..... But there it goes. :o
I have a list words. This list is taken out of a file with grep and cut.
my @system = (`grep up system_list| cut -d':' -f1`
);
system=
sm00xp03
sm01ftp02
sm00ssh12
What I want to have is a list, with each of the words in the... (1 Reply)
Discussion started by: pmpx
1 Replies
9. Shell Programming and Scripting
Hi,
I need to write a perl script that should do a search recursively in all the '*.txt' files for the string "ALL -Tcb" and should print only the file names that do not contain this string. (21 Replies)
Discussion started by: royalibrahim
21 Replies
10. Shell Programming and Scripting
hi,
im quite new to perl regexp. i have a problem where i want to extract a word from a given string. but the word is unknown, only fact is that it appears as the second word in the string.
Eg.
input string(s) :
char var1 = 'A';
int var2 = 10;
char *ptr;
and what i want to do is... (3 Replies)
Discussion started by: wolwy_pete
3 Replies