Ubuntu :: Bash: Compare 2 Wav's Files If Similar

Dec 20, 2010

I would like to compare them, in terms of amplitude, length, tempo, ... Which program could basically analyse them giving an sufficient output data

View 2 Replies


ADVERTISEMENT

General :: Script In Bash - Compare Two Files Name

Mar 7, 2010

I want to compare 2 name files, for instance. I got the package foo1.tgz and the foo2.tgz. and I want a script in bash that detects foo2 is newer than foo1 and delete foo1. Can it be done for managing collection of slackware packages.

View 2 Replies View Related

Programming :: Bash Script To Find And Remove Similar Lines From Multiple Files?

Jun 5, 2009

I want to remove duplicate or multiple similar lines from multiple files. I.e. if I have four files file1.txt file2.txt file3.txt and file4.txt and would like to find and remove similar lines from all these files keeping only one line from these similar lines. I only that uniq can be used to remove similar lines from a sorted file.

View 9 Replies View Related

Ubuntu :: Software That Can Compare And Find Similar & Duplicate Images For Ubuntu?

Apr 1, 2011

Here's the problem I hope to solve: I had to recover a hard drive with pictures and other data on it after the file system was erased. Now, in some cases there are 5 or more instances of the same image with different sizes and different file names. Sometimes the images are also in different formats such as jpeg or pnm...

Some of these images may be duplicates of images in a backup hard drive. I am just asking to see if there is a software that can visually compare images, find visual similarities, and ask me which to keep.

View 5 Replies View Related

General :: Compare Two Arrays In Bash?

Sep 30, 2010

I am writing a script to get the multiples of 2 and 3, place them in an 2 arrays, and then show the common integers. So far everything works fine till the comparision. I don't know how to compare them. Here is the code:

Code:

#!/bin/bash
let num1="2"
let num2="3"

[code]...

View 6 Replies View Related

General :: Compare File Timestamp In Bash?

May 6, 2010

How do I compare the timestamp of two files? I tried this but it doesn't work:

file1time=`stat -c %Y fil1.txt`
file2time=`stat -c %Y file2.txt`

[code]....

I printed both the time stamps, in order and it gives me

1273143480
1254144394
./script.sh: line 13: [1273143480: command not found

So basically if comparision is not working, I guess. Or if there is any other nice way than what I am doing, please let me know.

Edit: There was no space in between if, so changing it to this works:

if [ $file1time -gt $file2time ]

View 3 Replies View Related

Programming :: Bash - Compare Directory To Database?

May 23, 2011

I have a (rather large) database of mp3 track information. I also have several directories of the actual mp3s. I'm trying to write a simple bash script that will check the contents of the directories against what's in the database, and upon finding a file that isn't in the database, do something.

Here's what I have so far:

Code:

The trouble I'm having (in the sample directory of "/mnt/music/B/Beatles, The/" the file "Beatles, The - Taxman.mp3" isn't in the database.) is getting it to actually trigger an error when an entry isn't in the database.

Once triggering on a non-entered file is working, any way to get it to traverse the entire /mnt/music hierarchy?

View 13 Replies View Related

Programming :: Reading File And Compare In Bash Scripts?

Dec 9, 2010

how to program in bash, an i have a problem, i am trying compare values in between 2 values (from another file), so far my solution is to make a nested for loop, but that causes it to compare every value. Here is a visulization of what i want

file.a 2,3,4,5
file.b
3 5

[code]...

i want the values 2, 3, 4, 5 from file.a to be compared inbetween values 3 5, 6 9,1 2, 4 7 from file.b (var1 is the value im comparing, var2 is the less value, var 3 is the greater value)

for i in $var1
do
for k in $var2
do

[code]....

my problem with the above code is it compares EVERYINNG, not the values inbetween what i want (which is 3 5, 6 9 etc).

View 8 Replies View Related

Ubuntu :: Command With The -r Option To Compare A Large Number Of Files And Files In Subdirectories

Jun 16, 2011

I am using the diff command with the -r option, to compare a large number of files and files in subdirectories. My main interest is to find out which files have been changed, and not what the actual changes are, and since a lot of files has been changed, it would be a lot easier to view the file names only. Is there and option for diff that might do this, or does there exist a similar tool/command that could do the job?

View 1 Replies View Related

Programming :: Bash Regexp String Compare Stopped Working?

Oct 20, 2010

Have a bash script which contains a line like this:

if [[ ${array[${last}]} =~ "screenpc.PRODUCTION.*" ]]

which WORKED as expected in bash 4.0.33 and now fails in 4.1.2

Instrumented the script to print the value of the left-hand side and it is exactly what is expected.

As noted above, this has been working fine until we installed Fedora 13 (kernel 2.6.33), and now it fails.

Tried setting shell 'extglob' to On with same results.

Did something change? Are there other shell/bash options that need to be set?this has the whole installation stopped!

View 10 Replies View Related

General :: Bash Script To Categorize Folders On Similar Names?

Oct 10, 2010

Any script to categorize folders with similar name into one directory. For example: There are 4 directories named LinuxFedora, LinuxUbuntu, WindowsXP and Windows7. The script should be able to create two folder named Linux and Windows wheree respective directories are moved.

Next example: If there are many folder as below:
DevLys 010
DevLys 010

[code]...

View 1 Replies View Related

Ubuntu :: Compare Two Pdf Files For Text Differences?

Mar 10, 2010

How can I compare two pdf files for text differences

View 3 Replies View Related

General :: Compare 2 Files In Unix?

Aug 9, 2011

file 1 :

DB_NAME FIRST_ACTIVE_LOG DBPARTITIONNUM
-------- -------------------- --------------
BP1 279231 0
BP1 12735 1
BP1 12734 2
BP1 12735 3
BP1 12616 4

[Code]...

View 4 Replies View Related

General :: Compare Two Files In Perl?

Oct 27, 2009

I want to compare two files in perl, I have two files file1.txt & file2.txt. if column1 on file2.txt match column1 on file1.txt then I want my result on file3.txt (column1 column2 file1.txt + column1 column2 column3 file2.txt). this problem was solved with "awk" but I want to do in perl.

file1.txt
---------
column1 column2
------- -------
linux-2049 1
linux-2817 1

[code]....

View 5 Replies View Related

General :: Compare Two Files With Different Command

Jan 13, 2011

i have file1 and file2.

[Code]...

Here i want to compare these two files with diff command and need to take the common things in a separate file. File contents are 7 strings in length and everything will start with the character e. File 3 contents should be

[Code]...

View 5 Replies View Related

General :: Compare Binary Files In System?

Mar 29, 2010

I need to compare two binary files and get output in form

for every different byte. So if file1.bin is code...

what is the easiest way to accomplish the goal? Standard tool? Some 3rd party tool?

View 5 Replies View Related

General :: Compare Files On Ftp-server And In A Folder?

Apr 12, 2010

How to compare files on ftp-server and in a folder in Linux?

View 4 Replies View Related

Fedora :: Cannot Compare Two Directories And Print Files

Sep 12, 2010

I have to write a script that accepts two directory names (JIIT, JUIT) as positional parameters and checks which files are identical in both directories and files having same contents are also considered as identical in same directory. I tried using diff:

#both directories contain three files...file1, file2, file3
echo "Enter the directories:"
read d1
read d2
cd $d1

if diff file1.sh file2.sh > /dev/null
then echo same 1,2
else echo different
fi

if diff file1.sh file3.sh > /dev/null
then echo same 1,3
else echo different
fi

if diff file2.sh file3.sh > /dev/null
then echo same 3,2
else echo different
fi

cd ../
cd $d2
.....

I used the same code in the other directory for the three files. This is not running. I also want to know what to do when I need to compare files from different directories. i.e., JIIT, JUIT..

View 3 Replies View Related

Programming :: Compare Files With Fields Separated With ':'?

Jul 16, 2011

Dear expertsI have files like

ABD : 5869 events, relative ratio : 1.173800E-01 , sum of ratios : 1.173800E-01
VBD : 12147 events, relative ratio : 2.429400E-01 , sum of ratios : 3.603200E-01
SDF : 17000 events, relative ratio : 3.400000E-01 , sum of ratios : 7.003200E-01

[code]....

View 3 Replies View Related

Programming :: Script To Compare Users In Files?

Mar 28, 2011

I have two files with user DN's that exported from two different LDAP directories. I wanted to write a script that reads(checks) users (cn=user1) in file Ack to see if users(cn=user1) exists in file B and give me nice output with what users are missing in file B.I have around 30k users in file A with following format..Quote:

cn=user1,ou=some,o=org
cn=user2,ou=some,o=org
cn=user3,ou=some,o=org

[code]...

View 7 Replies View Related

General :: Compare The Files Differences Between 2 Virtualbox Snapshot?

May 20, 2011

How to compare the files differences between 2 virtualbox snapshots?

View 1 Replies View Related

Programming :: Compare Two Md5sum Outputs To See If The Files Match?

Nov 5, 2010

I would like to compare two md5sum outputs to see if the files match. in my script I have

Code:

ORG_FILE="/path/to/org/file.zip"
NEW_FILE="path/to/new/file.zip"
MD5_ORIG=$(md5sum -b "$ORG_FILE")

[code]....

How do I get just the MD5 hash and not the */.... stuff so I can compare them. i tried Code: JUST_HASH=${$MD5_ORIG:0:32} but All I get is

dir_mon_notify.sh: line 79: ${$MD5_ORIG:0:32}: bad substitution

View 1 Replies View Related

General :: Compare Files And Pull Out Required Data?

Nov 10, 2010

I have 2 files to compare and then print out information that match a certain pattern. I know basic scripting and was heading down the path of merging the 2 files together but this is the wrong approach. Would really appreciate a script that can do what is required:

file 1 contains dates, times and ID's:
2010-10-28 10:42 5939697357
2010-10-28 11:56 5919543491

[code]...

View 4 Replies View Related

General :: Compare 2 Text Files And Change Lines?

Jul 21, 2011

in the shell. how do i compare 2 text files and change matching lines in one of the files ?

example:
cat file_1.txt
line_1

[code]...

View 6 Replies View Related

General :: Compare Directory/files In Two Different Linux Boxes?

Apr 5, 2011

How can I use diff to compare the files of similar directories on to diferent linux boxes.

View 1 Replies View Related

Programming :: Compare Two Files Using Perl Or Shell Scripting?

Mar 8, 2010

I want to compare the following two tab-delimited .txt files (both were subsets of the original files) by comparing Columns 3 and 4 simultaneously. It is easy to compare C3 because both C3s are just numbers. But how to compare C4s?Basically, in File1, "G,G" = G in File2, "C,C" = C in File2, "A,A" = A in File2, "T,T"= T in File2.In File2, A/T in Column4 just equals "A,T" or "T,A" in Column4 of File1. C/T in Column4 just equals "C,T" or "T,C" in Column4 of File1, and etc.

File1:

C1C2 C3C4
ih509rs12345467244750"G,G"
ih499rs6049687244911"C,C"
ih508- 7244977"A,A"

[code]....

View 2 Replies View Related

General :: Compare Directory Structure Without Matching Data In Files

Jul 22, 2010

What is the best and simplest way to compare two directory structures without actually comparing the data in files. This works fine:
diff -qr dir1 dir2
But it's really slow because it's comparing files too. Is there a switch for diff or another simple cli tool to do this?

View 4 Replies View Related

Programming :: Rsync - Script To Compare Files And Transfer Updates

Oct 4, 2010

I need to create a script that will compare the differences between two folders and then to copy only the updated and new files only to another directory. I know I need to use rsync here, I can write scripts so really it not how to create a script it is how do I accomplish the transfer of only new or changes files between two folders to a new file. Do I need to link these two folders first and then use the "--compare-dest" switch.

View 8 Replies View Related

General :: Shell Scripting - Compare Strings From Two Different Simple .txt Files?

Jul 29, 2010

what command is to be used to call strings from other files to the script and then comparing strings from two different files in the script to check if strings are matched then return the result to another script.

View 1 Replies View Related

Software :: Compare/diff A Range Of Lines From Two Text Files?

Mar 26, 2010

i tried using diff --GTYPE-group-format= with <%, but not sure that right solution.Here's what im trying to do. I have two c source files, file1 and file2. file1 has a function in it that's been modified in file2. However, the functions begin at differnt line numbers in eachof the files. Is there a way to specify a range of file numbers on file1 and file2 to compare, using diff or any other combination of utilities? I can always output text from a range of lines from each file to two separate and new files and then compare those, but that's tedious. I could also write up a script to automate this type of solution, but I imagine there's an existing way of doing this.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved