Search Results

Search: Posts Made By: raj_saini20
1,499
Posted By raj_saini20
Try this Third field move to last, if required in...
Try this Third field move to last, if required in order can be done

awk -F"|" '(!a[$1"|"$2"|"$4]){a[$1"|"$2"|"$4]=$3;next}{if(a[$1"|"$2"|"$4] < $3){a[$1"|"$2"|"$4]=$3}}END{for( i in a) { print...
6,947
Posted By raj_saini20
use touch command
use touch command
1,741
Posted By raj_saini20
Removed
Removed
2,693
Posted By raj_saini20
what is the basis of desire result please...
what is the basis of desire result please explain.
i thought you need the missing lines.
2,693
Posted By raj_saini20
awk 'NR==FNR{a[$0]++;next}(!a[$0])' hwlock.dep...
awk 'NR==FNR{a[$0]++;next}(!a[$0])' hwlock.dep hwlock-full.dep > report.dep
2,699
Posted By raj_saini20
awk -F"#" '{print $1}' filename
awk -F"#" '{print $1}' filename
1,581
Posted By raj_saini20
provide more input sample for further help
provide more input sample for further help
2,446
Posted By raj_saini20
you can use the substitution example take the...
you can use the substitution example take the value in variable and use

${var/[//}
17,978
Posted By raj_saini20
try this cal 2013 | awk...
try this
cal 2013 | awk 'BEGIN{b[0]=3;b[1]=2;b[2]=1;b[3]=7;b[4]=6;b[5]=5;b[6]=4}($1 ~ /^S$/){x=1;mon1=p;getline;for(i=2;i<=NF;i++){if($i==1){a[x]=i;x++}};
...
1,283
Posted By raj_saini20
one method can be to writer the script which...
one method can be to writer the script which look the modification time and if it is different from the last modified time then tail last four line of that log file into common log file.
1,079
Posted By raj_saini20
your requiremnet is not clear. please explain...
your requiremnet is not clear. please explain with more sample data and also sample of actual data file.
36,593
Posted By raj_saini20
what criteria you are following to split the file
what criteria you are following to split the file
2,496
Posted By raj_saini20
try this your code with some modification ...
try this your code with some modification

awk -F'\t' 'FNR==NR{a[$0]=1;next} {
n=split($6,b,",")
n1=split(b[1],c," ")
x=b[1]
b[1]=c[n1]
$6=""
for(i=1;i<=n;i++)
if(b[i] in a)
print $0,...
2,496
Posted By raj_saini20
this error is because you are using Trying to...
this error is because you are using
Trying to assign array to non-array

$6=c;


---------- Post updated at 05:41 PM ---------- Previous update was at 05:37 PM ----------

if your id tags...
870
Posted By raj_saini20
awk '{a[NR]=$0;if(length>max)...
awk '{a[NR]=$0;if(length>max) max=length}END{for(j=1;j<=max;j++){for(i=1;i<=NR;i++){printf "%s ",substr(a[i],j,1)};printf "\n"}}' filename
16,084
Posted By raj_saini20
awk 'NF>0{x=$0;getline y;print x FS y}'...
awk 'NF>0{x=$0;getline y;print x FS y}' filename
1,174
Posted By raj_saini20
awk -F">" '{for(i=1;i<=NF;i++){split($i,b,"...
awk -F">" '{for(i=1;i<=NF;i++){split($i,b," ");if(i==1){x=b[1];y=b[2];continue}; print x" "y" "FS b[1];y=b[2]}}' filename
1,367
Posted By raj_saini20
Try this as per your input file dat1=$( date...
Try this as per your input file

dat1=$( date "+ %Y%m%d%H%M%S" )
awk -F"," -v dat="$dat1" '
NR==1{x=$0;next}
($3 ~ /GSM|LTE|UTMS/){
split($3,a," ");
if(!b[a[2]])
{...
2,606
Posted By raj_saini20
awk '$9 ~ /^-/{print > "file1";next}{print >...
awk '$9 ~ /^-/{print > "file1";next}{print > "file2"}' filename
2,087
Posted By raj_saini20
awk 'NF>0{print $0","}' RS=, filename
awk 'NF>0{print $0","}' RS=, filename
2,379
Posted By raj_saini20
try this awk '/TR/{if($1 ~/^<TR/){f=1};if($1...
try this

awk '/TR/{if($1 ~/^<TR/){f=1};if($1 ~ /^<\/TR/){f=0};print;next}(f==0&&NF>0){print "<TR sometext>";f=1}{print}' filename
1,847
Posted By raj_saini20
check this if it is working for splitting into 10...
check this if it is working for splitting into 10 files.
if this code is working i will further modify it for insertion of header in all the ten files.
One more thing in how many lines your header...
1,385
Posted By raj_saini20
your entire input data will have same continuous...
your entire input data will have same continuous row on column for or it can be anywhere in file
1,847
Posted By raj_saini20
can you provide sample data of input and output...
can you provide sample data of input and output for your requirement
1,367
Posted By raj_saini20
please provide the sample input and required...
please provide the sample input and required output
Showing results 1 to 25 of 205

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