Search Results

Search: Posts Made By: rajangupta2387
2,278
Posted By Yoda
Yes, modify the printf statement, put format...
Yes, modify the printf statement, put format specifier:
printf "%s", OFS A[i];
2,278
Posted By Yoda
Here is the modified code: sort file | awk...
Here is the modified code:
sort file | awk -F'|' '
(P[1] == $1) && (P[2] == $2) {
n = split ($0, A, /[|]/)
printf OFS
for ( i = 3; i <= n; i++)
printf...
2,278
Posted By Yoda
sort file | awk -F'|' ' A[1] == $1 && A[2] ==...
sort file | awk -F'|' '
A[1] == $1 && A[2] == $2 {
n = split ($0, A, /[|]/)
printf OFS
for ( i = 3; i <= n; i++)
printf OFS A[i];
printf RS
}...
894
Posted By sangfroid
just change output=$(grep "ERROR"...
just change

output=$(grep "ERROR" $logfile|grep -v "pattern that u don't want to match")

man grep:

-v, --invert-match
Invert the sense of matching, to select non-matching...
3,686
Posted By elixir_sinari
Does this give you what you want (from your...
Does this give you what you want (from your original file)? If it does, format the output as per your requirement.
gawk -F: '{for(i=1;i<NF;i++)
{
n=split($i,e,/[-;|]/)
exists[e[1]]
...
Showing results 1 to 5 of 5

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