12-09-2011
Sorry forgot to say it's SunOs. The grep command doesn't work:
Usage: grep -hblcnsviw pattern file . . .
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to search through all files with different file suffixes in a directory structure to locate any files containing a specific string (5 Replies)
Discussion started by: wrwelden
5 Replies
2. UNIX for Dummies Questions & Answers
i need help with my script....
i am suppose to grab files within a certain date range
now i have done that already using the touch and find command (found them in other threads)
touch -d "$date_start" ./tmp1
touch -d "$date_end" ./tmp2
find "$data_location" -maxdepth 1 -newer ./tmp1 !... (6 Replies)
Discussion started by: deking
6 Replies
3. Shell Programming and Scripting
Hello friends,
I want a command to print the reult files from find command into a text file.:)
Iam looking from forum memebers. PLZ help me.ASAP
Thanks in Advance,
Siva Ranganath CH (5 Replies)
Discussion started by: sivaranga001
5 Replies
4. Shell Programming and Scripting
How can I pass $var_find variable as argment to find command?
test.sh
var_find=' \( -name "*.xml" -o -name "*.jsp" \) '
echo "${var_find}"
find . -type f ${var_find} -print
# Below statement works fine.. I want to replace this with the above..
#find . \( -name "*.xml" -o -name... (4 Replies)
Discussion started by: kchinnam
4 Replies
5. UNIX for Advanced & Expert Users
I would like to know why this command does not work.
I have a script which connects to and ftp site.
After getting the remote files localy i need move each remote file to a archive folder on the FTP site
*Please also note that some of the files have spaces in the file name.
Im trying to... (3 Replies)
Discussion started by: juanjanse
3 Replies
6. Shell Programming and Scripting
find . -type fl
o/p is only the ordinary file. where in it wont give the link files. (2 Replies)
Discussion started by: nikhil jain
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a text file as follows:
a.txt
------
STEPS=3
STEP_DURATION=100
INTERVAL=60
I want to use these values in a shell script.
How to go about this? (3 Replies)
Discussion started by: akarnya
3 Replies
8. Shell Programming and Scripting
Hi all,
How to pass the command line argument to a sql file
Script:
#!/bin/ksh
if ] ; then
test.sql
fi
My Sql Informix DB:
echo "select * from table where col1 = 2234
and col2 = '$3'"|dbaccess ddname
But im getting `:' unexpected error (5 Replies)
Discussion started by: Roozo
5 Replies
9. Shell Programming and Scripting
I'm looking to write a script that takes a .txt filename as an argument, reads the file line by line, and passes each line to a command. For example, it runs command --option "LINE 1", then command --option "LINE 2", etc. I am fetching object files from a library file, I have all the object file... (2 Replies)
Discussion started by: Paul Martins
2 Replies
10. Shell Programming and Scripting
I'm writing python script to get the file-names in the current directory and file sizes .I'm able to get file list and their sizes but unable to pass them through command line. I want to use this script to execute on other directory and pass directory path with file name through command line. Any... (1 Reply)
Discussion started by: etldeveloper
1 Replies
DIFF3(1) GNU Tools DIFF3(1)
NAME
diff3 - find differences between three files
SYNOPSIS
diff3 [options] mine older yours
DESCRIPTION
The diff3 command compares three files and outputs descriptions of their differences.
The files to compare are mine, older, and yours. At most one of these three file names may be -, which tells diff3 to read the standard
input for that file.
Options
Below is a summary of all of the options that GNU diff3 accepts. Multiple single letter options (unless they take an argument) can be com-
bined into a single command line argument.
-a Treat all files as text and compare them line-by-line, even if they do not appear to be text.
-A Incorporate all changes from older to yours into mine, surrounding all conflicts with bracket lines.
-B Old behavior of -A. Shows non-conflicts.
-e Generate an ed script that incorporates all the changes from older to yours into mine.
-E Like -e, except bracket lines from overlapping changes' first and third files. With -e, an overlapping change looks like this:
<<<<<<< mine
lines from mine
=======
lines from yours
>>>>>>> yours
--ed Generate an ed script that incorporates all the changes from older to yours into mine.
--easy-only
Like -e, except output only the nonoverlapping changes.
-i Generate w and q commands at the end of the ed script for System V compatibility. This option must be combined with one of the
-AeExX3 options, and may not be combined with -m.
--initial-tab
Output a tab rather than two spaces before the text of a line in normal format. This causes the alignment of tabs in the line to
look normal.
-L label
--label=label
Use the label label for the brackets output by the -A, -E and -X options. This option may be given up to three times, one for each
input file. The default labels are the names of the input files. Thus diff3 -L X -L Y -L Z -m A B C acts like diff3 -m A B C ,
except that the output looks like it came from files named X, Y and Z rather than from files named A, B and C.
-m
--merge
Apply the edit script to the first file and send the result to standard output. Unlike piping the output from diff3 to ed, this
works even for binary files and incomplete lines. -A is assumed if no edit script option is specified.
--overlap-only
Like -e, except output only the overlapping changes.
--show-all
Incorporate all unmerged changes from older to yours into mine, surrounding all overlapping changes with bracket lines.
--show-overlap
Like -e, except bracket lines from overlapping changes' first and third files.
-T Output a tab rather than two spaces before the text of a line in normal format. This causes the alignment of tabs in the line to
look normal.
--text Treat all files as text and compare them line-by-line, even if they do not appear to be text.
-v
--version
Output the version number of diff3.
-x Like -e, except output only the overlapping changes.
-X Like -E, except output only the overlapping changes. In other words, like -x, except bracket changes as in -E.
-3 Like -e, except output only the nonoverlapping changes.
SEE ALSO
cmp(1), comm(1), diff(1), ed(1), patch(1), sdiff(1).
DIAGNOSTICS
An exit status of 0 means diff3 was successful, 1 means some conflicts were found, and 2 means trouble.
GNU Tools 22sep1993 DIFF3(1)