Search Results

Search: Posts Made By: sa@@
1,921
Posted By senhia83
Try $ cat tmp >C4603985 ...
Try


$ cat tmp
>C4603985
...
1,921
Posted By Don Cragun
senhia83's script can be simplified a little bit...
senhia83's script can be simplified a little bit to something like:
awk '
/^>/ { copy = ($0 ~ /^>stt/) }
copy' infile

As always, if you want to try this on a Solaris/SunOS system, change awk to...
1,921
Posted By pilnet101
You can try: awk 'NF&&!/^C/{print ">"$0}'...
You can try:

awk 'NF&&!/^C/{print ">"$0}' ORS="" RS=">"
1,921
Posted By RavinderSingh13
Hello sa@@, One more approach may help you,...
Hello sa@@,

One more approach may help you, very slightly different from Don's and Senhia83's script. Enjoy learning :b:

awk '/^>stt/ {A=1} A{print} !/^>stt/ {A=0}' Input_file


Output will...
1,648
Posted By vbe
In other words you have no write permission in...
In other words you have no write permission in that directory...
1,648
Posted By ahamed101
Try this awk '/assumption/{ st=$0;...
Try this


awk '/assumption/{
st=$0; split($NF,arr,"[=;.]")
if(arr[2] in key){ print; next }
key[arr[2]]; $3="predictive"
sub ( /\.[0-9]*\;/, ";")
print; print st; next
...
1,327
Posted By Corona688
That depends on the application being used.
That depends on the application being used.
1,327
Posted By Corona688
The second is safer, in case one of your...
The second is safer, in case one of your variables has spaces in it, but you have an extra space in there which will mess it up.

system("Detector -lib \"$source/version2/files/imread.txt\" -nolow...
1,526
Posted By RudiC
Try (untested)awk '{print length ($0)}' RS=">"...
Try (untested)awk '{print length ($0)}' RS=">" ORS=">" file
1,210
Posted By brianadams
#!/usr/bin/env perl open( $fh, "<", "file")...
#!/usr/bin/env perl

open( $fh, "<", "file") or die "Cannot open file: $!\n";

while( my $line = <$fh>) {
chomp($line);
my @array = split /\s+/, $line; # split to get 3rd field
if (...
1,210
Posted By jethrow
perl -lape 'if($F[2] eq assumption) {$_.="$/$_";...
perl -lape 'if($F[2] eq assumption) {$_.="$/$_"; $_=~s/$F[2](.*?ID=\w+)\.\d/predictive\1/}' file
1,210
Posted By Scrutinizer
I am not sure I understand what you mean. The 2nd...
I am not sure I understand what you mean. The 2nd command does not replace but adds a "predictive" line:

$ sed 's/\(.*\)assumption\(.*\)\(ID=[^.]*\)[^;]*\(;.*\)/\1predictive\2\3\4\
&/' file...
1,210
Posted By Scrutinizer
You could try: awk '$3=="assumption"{$0=$0 ORS...
You could try:
awk '$3=="assumption"{$0=$0 ORS $0; sub($3, "predictive")}1' fileBut you would also need to adjust the ID in the last column, no?

Perhaps sed:
sed...
Showing results 1 to 13 of 13

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