Search Results

Search: Posts Made By: Divya Nochiyil
12,925
Posted By in2nix4life
Here's a basic concept that I wrote: ...
Here's a basic concept that I wrote:


#!/bin/bash
#
# procWatch.sh
#
# -- script to check the elapsed time of a given
# -- process and if running longer than an hour
# -- kill the process...
5,159
Posted By greet_sed
Try this: awk 'NR==FNR{a[$1]=$1;next} { if...
Try this:
awk 'NR==FNR{a[$1]=$1;next} { if (!a[$1]) { print $1 } } ' file2 file1 output:
109912312312
cat file2
101250030067
101214200123
101214700333
101214700300
cat file1
101250030067...
5,159
Posted By pamu
with awk $ awk 'NR==FNR{A[$1]++;next}{if(!...
with awk

$ awk 'NR==FNR{A[$1]++;next}{if(! A[$1]){print }else{A[$1]=0}}END{for(i in A){if(A[i]){print i}}}' file1 file2

101214700333
101214100500
5,159
Posted By Akshay Hegde
You may try this also $ awk...
You may try this also

$ awk 'FNR==NR{A[$1]++;next}{if(!($1 in A))print;else delete A[$1]}END{for (i in A)print i}' file1 file2

101214700333
101214100500
Showing results 1 to 4 of 4

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