Returns three columns:
Column 1: Lines that appear only in file1,
Column 2: Lines that appear only in file2,
Column 3: Lines that appear in both files.
my file looks like this:
101928 101943
101928 101944
101929 101943
101929 101943
101929 102044
i want to insert bc to get answer like this:
101928 101943 000015
101928 101944 000016
101929 101943 000013
101929 101943 000014
101929 102044 000115
total 000173
my... (3 Replies)
I need to rename a directory full of files named like:
page_001.jpg
page_002.jpg
page_003.jpg
to the file name minus one. Meaning instead of page_001.jpg that file becomes page_000.jpg so:
page_001.jpg => page_000.jpg
page_002.jpg => page_001.jpg
page_003.jpg => page_002.jpg
I was... (3 Replies)
In Redhat it is easy....
date --date="60 minutes ago"
How do you do this in Solaris?
I got creative and got the epoch time but had problems..
EPOCHTIME=`truss date 2>&1 | grep "time()" | awk '{print $3 - 900}'`
echo $EPOCHTIME
TIME=`perl -e 'print scalar(localtime("$EPOCHTIME")),... (5 Replies)
Hi there,
I have a problem with arithmetic ops in awk.
Here is what my script does right now.
while read nr val ; do
case $nr in
400) awk '$2~/eigenvectors/ {print $NF-'$val'};' input.txt >> output.txt;;
esac
done < frames.txtI have a file named frames.txt with two columns (nr and... (2 Replies)
Hi,
I need to subtract 5 minutes from the date. Example
$date +"%Y-%m-%d-%H.%M.%S" displays 2014-06-26-06.06.38
I want to show it as 2014-06-26-06.01.38 (5 mins are subtracted from date)
Any help would be appreciated. I am currently on AIX version 6.1
-Vrushank (10 Replies)
Hi the below code is failing i am trying to generate do the following:
2014-10-22 11:26:00 (Substract 24 hrs)
should produce
2014-10-21 11:26:00
I need the same formatting below because that gets inputted into code for an... (4 Replies)
Hello,
date --date '-60 min ago' +'%Y-%m-%d %H:%M:%S,%3N'
Above command gives the date and time minus 60 minutes
but the problem i am facing is, i do not want to hardcode the value 60
it is stored in a variable var=60
now if i run below command , i get error
date --date '-$var min... (3 Replies)
Hello Folks,
I have a variable output holding date as below -
output = "20141220"
I need to extract a day out of it and store it in another variable i.e. something similar to below -
output1=20141219"
and if the month is changing i.e. date in on 31st or 1st it should be taken care of
"date... (5 Replies)
Discussion started by: ektubbe
5 Replies
LEARN ABOUT XFREE86
comm
COMM(1) User Commands COMM(1)NAME
comm - compare two sorted files line by line
SYNOPSIS
comm [OPTION]... FILE1 FILE2
DESCRIPTION
Compare sorted files FILE1 and FILE2 line by line.
When FILE1 or FILE2 (not both) is -, read standard input.
With no options, produce three-column output. Column one contains lines unique to FILE1, column two contains lines unique to FILE2, and
column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
--check-order
check that the input is correctly sorted, even if all input lines are pairable
--nocheck-order
do not check that the input is correctly sorted
--output-delimiter=STR
separate columns with STR
--total
output a summary
-z, --zero-terminated
line delimiter is NUL, not newline
--help display this help and exit
--version
output version information and exit
Note, comparisons honor the rules specified by 'LC_COLLATE'.
EXAMPLES
comm -12 file1 file2
Print only lines present in both file1 and file2.
comm -3 file1 file2
Print lines in file1 not in file2, and vice versa.
AUTHOR
Written by Richard M. Stallman and David MacKenzie.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report comm translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO join(1), uniq(1)
Full documentation at: <http://www.gnu.org/software/coreutils/comm>
or available locally via: info '(coreutils) comm invocation'
GNU coreutils 8.28 January 2018 COMM(1)