07-01-2009
thanks for your solution. I'll try it ASAP..
10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
Discussion started by: daikeyang
6 Replies
3. Shell Programming and Scripting
Hi Guys,
In the following line:
cn=portal.090710.191533.428571000,cn=groups,dc=mp,dc=rj,dc=gov,dc=br
I need to extract this string: portal.090710.191533.428571000
As you can see this string always will be bettween "cn=" and "," strings.
Someone know one regular expression to... (4 Replies)
Discussion started by: maverick-ski
4 Replies
4. Shell Programming and Scripting
Hi,
This is the first time playing around with perl and need some help.
Assuming if i have a line of text that looks like this:
Date/Time=Nov 18 17:12:11;Device Name=192.168.1.1;Device IP=192.168.1.1;Device Class=IDS;Source IP=155.212.212.111;Source Name=UNKNOWN;Source Port=1679... (3 Replies)
Discussion started by: LuckyGuy
3 Replies
5. Shell Programming and Scripting
Hi,
I have a input file with following values
(test.out)
I would like to grep all lines with word 'PANIC' and sent it another file using perl program with grep command. I have been trying different ways and not working. Pls advice. Thanks a lot for the help.
--example--... (3 Replies)
Discussion started by: hudson03051nh
3 Replies
6. Shell Programming and Scripting
continuing from my previous post, whose link is given below as a reference
https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569
consider there is create table commands in a file for eg:
CREATE TABLE `Blahblahblah` (
`id` int(11) NOT NULL... (2 Replies)
Discussion started by: vivek d r
2 Replies
7. Shell Programming and Scripting
Hi,
May i ask if someone share some command for extracting a string between 2 ref string in a txt file
My objective: i had a file with multiple lines and wants only to extract the string "watch?v=IbkAXOmEHpY" or "watch?v=<11 random character>", when i used "grep 'watch?=*' i got a results per... (4 Replies)
Discussion started by: jao_madn
4 Replies
8. Shell Programming and Scripting
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Discussion started by: ajayram_arya
4 Replies
9. Shell Programming and Scripting
Hello guys,
I have problem with hpux shell script. I have one big text file that contains like
SOH
bla bla bla
bla bla bla
ETX SOH
bla bla bla
ETX
SOH
bla bla bla
ETX
What I need to do is save first SOH*BLA into file1.txt, save second SOH*BLA into file2.txt and so on.... (17 Replies)
Discussion started by: sembii
17 Replies
10. Shell Programming and Scripting
Hello,
I have a log file with logs such as
01/05/2017 10:23:41 : file.log.38: database error, MODE=SINGLE, LEVEL=critical, STATE: 01170255 (mode main
how can i use perl to extract the 8-digit number below from the string
01170255
Thanks (7 Replies)
Discussion started by: james2009
7 Replies