Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: sabercats
822
Posted By sabercats
Get a data and save
If I have a A.log

1 Air Flow Monitor : 34.070 Degrees C
2 Air Flow Monitor : 41.730 Degrees C
3 Air Flow Monitor : 35.340 Degrees C
4 Air Flow Monitor : 33.370 Degrees C
5 Air...
1,419
Posted By sabercats
Thanks, it is almost perfect. I cannot get date ...
Thanks, it is almost perfect. I cannot get date
date '+%m%d'
date: extra operand `+%m%d'
Try `date --help' for more information.
Tried date --help
Usage: date [OPTION]... [+FORMAT]
or: date...
807
Posted By sabercats
awk and rename ?
I have a log file from /m/n/o/A.log with 1 line
current content: 19518634,SW,windows_x86_64
and an folder from /x/y/z/testit_folder
How do you write a shell script to rename test_folder to...
1,419
Posted By sabercats
Grep and rename ?
I have a log file from /m/n/o/A.log with 1 line
current content: 19518634,SW,windows_x86_64
and an folder from /x/y/z/testit_folder
How do you write a shell script to rename test_folder to...
Forum: Programming 05-01-2013
1,751
Posted By sabercats
Csh script and tcl
I have csh script and call tck command but it do nothing. can you help me?
I only can see it echo

#!/bin/csh -f

set mypath = `pwd`

echo $mypath
if ($mypath =~ *PLL*) then
echo "source...
976
Posted By sabercats
Do you know what was wrong with my code? It only...
Do you know what was wrong with my code? It only show no results found loop and did not get the record i want?

#!/usr/bin/perl

use warnings;
use Time::Local;

print <<'HTML';
Content-type:...
907
Posted By sabercats
I did it before and here what i will use ...
I did it before and here what i will use


awk -F\| 'NR==FNR{a[$1]++;next} (a[$1])' FILE1 FILE2 > FILE3.txt
976
Posted By sabercats
Do you think I should use html form and pl for...
Do you think I should use html form and pl for script to get data from my flat file or i should use pl for form and also pull info too? I just need to know can perl handle search multiple fields on...
976
Posted By sabercats
Perl search multiple fields
Hi all,

I have a flatfile 300 lines

tiger,tampa10-pc,yellow,none,2013-02-25 08:56:51.000,2013-02-25 21:41:11.380,12hrs : 44min
cat,tampa10-pc,white,none,2013-02-28 08:56:58.000,2013-03-04...
720
Posted By sabercats
Okay I made it work now with this code awk...
Okay I made it work now with this code

awk -F"|" '$1>=highest[$2,$3,$4,$5,$6,$7]{maxrec[$2,$3,$4,$5,$6,$7]=$0;highest[$2,$3,$4,$5,$6,$7]=$1} END{for(i in maxrec)print maxrec[i]}' filename.txt |...
720
Posted By sabercats
1150| San Jose|8|15|7|2013-02-19...
1150| San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000
1263|San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000

These 2 records have the same all fields
San...
720
Posted By sabercats
Compare fields and keep record with bigger ID?
How do you write a shell script to compare records with the same fields then keep the biggeer id number fields (field separate by a pipe)


1150| San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20...
1,326
Posted By sabercats
Wow, it works. Thank you very much for your help...
Wow, it works. Thank you very much for your help rangarasan
1,326
Posted By sabercats
I really don't think i have Linux Ubuntu and...
I really don't think i have Linux Ubuntu and cannot get the result i need. Any can find out the way to solve it? Thanks.
1,326
Posted By sabercats
I got the result only correct with last lines? ...
I got the result only correct with last lines?

|locations 2,3|san joseanythings
|locations 0,1,2,3|tampa
|locations 1|nevadaeld5
dog|izzy|14|something|somethings|locations 1,2,3|connecticut

...
1,326
Posted By sabercats
Compare 2 fields in 2 files
I am trying to compare two files (separted by a pipe) using 2 fields (field 1,3 from fileA and 1,2 from fileB) if the two files match i want the whole record of fileA adding the extra fields left...
1,514
Posted By sabercats
Thanks all. It also work with sort -t\| -k6,6...
Thanks all. It also work with
sort -t\| -k6,6 -u A.txt
1,514
Posted By sabercats
Sort field and uniq
I have a flatfile A.txt


2012/12/04 14:06:07 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 17:07:22 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 17:13:27 |trees|Boards 2,...
1,102
Posted By sabercats
Thanks
Thanks
1,102
Posted By sabercats
Jim, How do i write output to...
Jim, How do i write output to /some/where/fname.txt?
vgersh99, how do i write it to folder /some/where/o.txt ?
I write to local. If i add path i got syntax erro.
Thanks
1,102
Posted By sabercats
Write 2nd and 3rd fields to a 4th file name?
I have a flatfile A.txt

date|products|notes|location
121117|a108|this is a test|florida
121118|b111|just test it|tampa


How do i write an awk to create a file name as location.txt and have...
719
Posted By sabercats
Compare field and get the missing in Linux shell.
I have a log file A.txt

2012/11/13 20:06:11 |t112|Locations 12, 13, 14, 15|NET12/full_ddr3_2X_FV_4BD_1.qt|norway|0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15|norway22
2012/11/14 14:23:19 |t112|Locations...
1,171
Posted By sabercats
Works so beautiful. Thanks Chubler_XL
Works so beautiful. Thanks Chubler_XL
1,171
Posted By sabercats
From awk -F\| '{ sub(/.*Locations...
From

awk -F\| '{
sub(/.*Locations /,"",$3)
path=val=$3
sub(/,.*/,"",val)
val+=10
sub(/ for.*/,"",$3)
sub(/.*NET/, "NET",path)
sub(/\.qt.*/, ".qt",path)
print $1 FS...
1,171
Posted By sabercats
Wow, it works beautiful. Thanks Chubler_XL Now...
Wow, it works beautiful. Thanks Chubler_XL
Now what if i have A.txt with extra 2nd field is 16

2012/11/13 20:06:11 |16|284:hawk pid=014268 opened Locations 12, 13, 14, 15 for...
Showing results 1 to 25 of 130

 

Featured Tech Videos

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