9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies
2. Shell Programming and Scripting
Hi,
Can somebody tell whats wrong with "find and replace perl code".
I wanted to find "\n".write(status,data" and replace with "\n",data" in multipls files.
#!/usr/bin/perl
my @files = <*.c>;
foreach $fileName (@files) {
print "$fileName\n";
my $searchStr0 =... (4 Replies)
Discussion started by: chettyravi
4 Replies
3. Shell Programming and Scripting
Dear All,
Please help me, I have file input like this,
1 2142
215 2162
217 2842
285 2862
287 4002
401 4022
403 4822
1 2142
215 2162
217 2842
285 2862
287 4002
401 4022
403 4882
1 4801 (8 Replies)
Discussion started by: attila
8 Replies
4. Shell Programming and Scripting
Hi there. I have a number allocation problem whereby I have 2 arrays built from 2 different sources. The arrays will just contain a listed of sorted numbers
@a
1
7
10
14
15
16
@b
1
7
10
11
14
15
16 (2 Replies)
Discussion started by: hcclnoodles
2 Replies
5. Shell Programming and Scripting
Hi Perl Experts,
Could somebody help me how to solve my problem if I have array contains the following data:
"SEQ-0 UNSORT2 0",
"SEQ-1 UNSORT2 1",
"SEQ-2 UNSORT2 2",
"SEQ-3 UNSORT2 3",
<--- Missing the... (0 Replies)
Discussion started by: askari
0 Replies
6. Shell Programming and Scripting
Dear Perl users,
I need your help to solve my problem below.
I want to print the sequence number without missing number within the range.
E.g. my sequence number :
1 2 3 4 5 6 7 8 11 12 13 14
my desired output:
1 -8 , 11-14
my code below but still problem with the result:
1 - 14
1 -... (2 Replies)
Discussion started by: mandai
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I’m trying to do something I haven’t done before and I’m struggling with how to even create the command or script.
I have the following space delim file:
gene accession chr chr_st begin end
NN1 NC_024540 chr3 - 14000 14020
NN1 ... (10 Replies)
Discussion started by: wolf_blue
10 Replies
8. Shell Programming and Scripting
Friends,
Need some help.
On linux i have to run iostat command and in each iteration have to print the greatest value in each column.
e.g
iostat -dt -kx 2 2 | awk ' !/sd/ &&!/%util/ && !/Time/ && !/Linux/ {print $12}'
4.38
0.00
0.00
0.00
WHhat i would like to... (15 Replies)
Discussion started by: achak01
15 Replies
9. Shell Programming and Scripting
Hi i want to ask how can i use perl and find a word in a text file, and also telling that which page doesn't it exist?
Eample: have a 10 pages text file, then i need to find 'Hello' in the file, and show that which page is it contain in.
Output: Hello contains 8 times in page 1, 3, 4, 7, 10... (9 Replies)
Discussion started by: mingming88
9 Replies