Search Results

Search: Posts Made By: nsk
6,193
Posted By Jotne
Why do you need it one line? Here is what...
Why do you need it one line?

Here is what you have done wrong.
awk ' {a[++i]=$0; l=i } END { for(j=l; j>=1; j--) { if(a[j] ~ /and/ && !f) { sub("and",x,a[j]); f=1; } } for(i=1; i<=l; i++) print...
6,193
Posted By Yoda
Here is an awk program to remove last occurrence...
Here is an awk program to remove last occurrence of pattern and from a file:
awk ' {
a[++i]=$0
l = i;
} END {
for(j=l; j>=1; j--)
{
if(a[j] ~...
6,193
Posted By RudiC
Sorry, then I'm out of ideas. $ t="on a.id1 =...
Sorry, then I'm out of ideas. $ t="on a.id1 = b.id1 and
on a.id2 = b.id2 and
on a.id3 = b.id3 and"

$ echo "$t"
on a.id1 = b.id1 and
on a.id2 = b.id2 and
on a.id3 = b.id3 and

$ echo...
Showing results 1 to 3 of 3

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