10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I have something like this
a 1
b 1
c 1
d 1
e 1
This is inside 1.dat
and this is what I am trying to get
a 2
b 2
c 2
d 2
e 2 (4 Replies)
Discussion started by: jeo_fb
4 Replies
2. Shell Programming and Scripting
Hello Team,
i have a file test1.txt, in which i have to grep only the 6 digit number from it,
Could you pls help in this.
$cat test1.txt
<description>R_XYZ_1.6 r370956</description>
$ grep "\{6\}" test1.txt
<description>R_XYZ_1.6 r370956</description>
i need output as 370956.
... (3 Replies)
Discussion started by: chandana hs
3 Replies
3. Shell Programming and Scripting
Hi.. I have this delicate problem..:wall: I have this huge ldif file with entry's like this example below..
And I need to change the following entrys.
telephoneNumber:
emNotifNumber:
billingnumber=
BillingNumber:
Al these entrys has a number like 012345678 and it needs to add one more... (15 Replies)
Discussion started by: pelama
15 Replies
4. Shell Programming and Scripting
Hi ,
I have a file which has a line starts with $segment_name and has the below data
source data
$Segment_Name = 123.ABC.123.01.txt
$Segment_Name = 123.ABC.ABC.txt
$Segment_Name = 123.ABC.12A3.txtMy target data should be
$Segment_Name = 123.ABC.123.01.txt
$Segment_Name =... (2 Replies)
Discussion started by: shruthidwh
2 Replies
5. UNIX for Advanced & Expert Users
Hi,
Below is an example of a record I have, which I wish to split using the perl's split function and load it into an array. I am having tough time figuring out the exact reg-ex to perform the split.
Given record:
"a","xyz",0,2,48,"abcd","lmno,pqrR, stv",300,"abc",20,
The delimiter to... (4 Replies)
Discussion started by: jghoshal
4 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to compare the value in a field to the value in a variable using awk. This works:
awk '$7 == "101"'but this is what I want (and it doesn't work):
value=101
awk '$7 == "$value"'
Any help or insight on this would be great. Thanks in advance. (1 Reply)
Discussion started by: goodbenito
1 Replies
7. Shell Programming and Scripting
For some reason,
@logs is a list of log files
@filter is a list of expressions to grep out
foreach (@logs){
open READ, "<$_" or die $!;
@temp=<READ>;
close READ;
foreach (@filter){
print grep /$_/,@temp ;
}
}
returns a regex error in one of the files... (4 Replies)
Discussion started by: adelsin
4 Replies
8. Shell Programming and Scripting
Hi,
I need a regular expression grepping all lines starting with '*' followed by a VARIOUS number of blanks and then followed by the string 'Runjob=1'.
I tried that code, but it doesn't work:
grep -i '*'+'Runjob=1' INPUT_FILE >>OUTPUT_FILE
Can someone help me?
Thanks (8 Replies)
Discussion started by: ABE2202
8 Replies
9. Shell Programming and Scripting
Can someone please help.
I need to add a sequence number to the start of each line of a file.
It needs to be 6 characters long. ie 000001 next line starts 000002 etc. (4 Replies)
Discussion started by: Dolph
4 Replies
10. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies