Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: som.nitk
1,053
Posted By Franklin52
Try: awk 'NR==FNR{a[$2]=$0;next}$5 in a...
Try:
awk 'NR==FNR{a[$2]=$0;next}$5 in a {$(NF-1)=a[$5]}1' FS="_" file2.txt FS="|" OFS="|" file1.txt
1,303
Posted By ygemici
# awk '/^ */{print $3}' FS='[<>]*' file ...
# awk '/^ */{print $3}' FS='[<>]*' file
RMDatabase
root
test

# sed -n '/^ */s/ *[></]*\|[A-Z]*Name\|PWord//pg' file
RMDatabase
root
test

# cut -d'<' -f2 file|cut -d'>' -f2

RMDatabase...
1,320
Posted By Scrutinizer
Try: perl -plne 's/([^,]*(,[^,]*){3}).*/$1/'
Try:
perl -plne 's/([^,]*(,[^,]*){3}).*/$1/'
1,320
Posted By durden_tyler
$ $ cat f63 693t622, ZOMBIAC SERVICES, ,...
$
$ cat f63
693t622, ZOMBIAC SERVICES, , 3267, N
985g367, DRUMBASH, , 2376, Y, 457
983y106, STEFFI, , 2344, N, 2345, B
$
$ # Using autosplit
$
$ perl -F, -plane '$_=join(",",@F[0..3])' f63...
1,936
Posted By vgersh99
The condition FNR==NR will be true only for the...
The condition FNR==NR will be true only for the FIRST file passed to awk for processing. Therefore, we read file2 into hash FIRST - then proceed with the processing for the other/file1 files.
5,497
Posted By fpmurphy
Change my $YN = <>; to my $YN =...
Change

my $YN = <>;

to

my $YN = <STDIN>;
7,252
Posted By masterpiece
Hi Rohon, Superb!! :b::b: Exactly as i want....
Hi Rohon,

Superb!! :b::b: Exactly as i want.

Thanks, you saved my day
7,252
Posted By
while read line1 do line2=`grep "$line1"...
while read line1
do
line2=`grep "$line1" file2`
if [ ! -z "$line2" ] ; then
echo "$line2" >> file3
else
echo "" >> file3
fi
done < file1
5,002
Posted By pludi
So if invoked explicitly, it does work?...
So if invoked explicitly, it does work? (Remember, we aren't psychics, we only know what you tell us)

What's the difference between the working system and the non-working one, other than different...
Showing results 1 to 9 of 9

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