Search Results

Search: Posts Made By: turk451
6,659
Posted By turk451
May work for you: find ~/modeling* -name...
May work for you:


find ~/modeling* -name "*.log"|xargs -ix bash -c "tac x|grep -m 3 -e ITER"
6,433
Posted By turk451
There is actually no check for the number "1"...
There is actually no check for the number "1" anywhere in the script. The "foreach" just iterates over all of the lines of the file, in order. The "if" statement checks to see if the line begins...
6,433
Posted By turk451
Got Perl? eturk-linux 20:13:50 (~/temp/pl)>...
Got Perl?

eturk-linux 20:13:50 (~/temp/pl)> cat filter.pl

#!/usr/bin/perl -w

open(IN,"dat.pdb") || die("Could not open infile!");
open(OUT,">new.pdb") || die("Could not open outfile!");
my...
4,500
Posted By turk451
Just one of a million Perl solutions: ...
Just one of a million Perl solutions:

#!/usr/bin/perl -w

open(IN,"out1.txt") || die("Could not open infile!");
open(OUT,">extract.txt") || die("Could not open outfile!");
foreach $line (<IN>)...
2,261
Posted By turk451
Let me give some output from your script to make...
Let me give some output from your script to make sure we're on the same page here:


eturk-linux 17:12:11 (~/bin)> ./test.pl
aaX
matches
eturk-linux 17:14:19 (~/bin)> ./test.pl
W1X
matches...
2,440
Posted By turk451
grep -i -E 'error|warning' file
grep -i -E 'error|warning' file
10,690
Posted By turk451
There are a couple areas for improvement of your...
There are a couple areas for improvement of your shell script. However, to address your primary concern, yes you can use variables in the find command. However, to allow those variables to be...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 12:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy