10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am using the below command to get the diff output of two files.
Here in the output file, I wish to add line number in front of each line starting position.
Please suggest the diff options or some command line utilities.
diff -y file1.txt file2.txt --width=300 > diff_f1_f2_300.txt... (5 Replies)
Discussion started by: k_manimuthu
5 Replies
2. UNIX for Dummies Questions & Answers
Platform :Oracle Linux 6.4
Shell : bash
In the below sample, although the lines in a.txt and b.txt are jumbled up, there is only one difference : b.txt has an extra line NETHERLANDS
$ cat a.txt
SPAIN
NORTH KOREA
PORTUGAL
GERMANY
SYRIA
$
$
$ cat b.txt
GERMANY
NORTH KOREA
SPAIN... (6 Replies)
Discussion started by: John K
6 Replies
3. Shell Programming and Scripting
I have a csv file that I am trying to edit. I need to remove any comma that is touching a letter. I used this command to find them.
grep , moz_places_good.csv | head -n 10 | grep ,I would think I could use some form of this to just delete the commas and not the letter before it. Just not sure... (5 Replies)
Discussion started by: cokedude
5 Replies
4. Shell Programming and Scripting
Hello Guys,
I request anyone to do me a small help in using diff command for following.
I am trying to compare two files for content and wish to keep the content after the comparison (The resultant file can't be blank)
However, the first lines would be different in both files and I need diff... (2 Replies)
Discussion started by: rockf1bull
2 Replies
5. Shell Programming and Scripting
hi there
Strange title? Well yes...it is strange..."touch" is driving me nutts! Trying to set the access / modified date by a bash script. For a certain time everything works well with all files. After point x the code works only for some files, for others it doesn't. After looking for the ... (4 Replies)
Discussion started by: blah0
4 Replies
6. UNIX for Dummies Questions & Answers
So, I think this is a really stupid question, but I'd like to see if I am right.
If the following commands are entered:
umask 000
touch file1
umask111
touch file2
...nothing should happen...right? The touch operation isn't going to apply any changes from umask to file1 (and same to... (1 Reply)
Discussion started by: Midwest Product
1 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have a small problem and would be happy if someone could help me to find a solution:
A machine ("server") makes backups of different computers ("clients") using rsync. Users and groups are keept, so that it's possible to copy them back to the client if required. The number of groups... (3 Replies)
Discussion started by: tracer
3 Replies
8. Shell Programming and Scripting
i have 2 file named test1,test2
contents of test1:
1
2
3
---------------------------
contents of test2:
1
2
3
4
5
--------------------------------------------------------
my desired o/p should be:
diff test2 test1
4 (5 Replies)
Discussion started by: ali560045
5 Replies
9. Programming
i need to create a file which contains (/) character.
Any help to do this (1 Reply)
Discussion started by: axes
1 Replies
10. Shell Programming and Scripting
Hi,
Is there any way to achieve diff of two files line by line.
for eg,
a.txt
a
b
c
d
e
b.txt
f
g
h
i
j (1 Reply)
Discussion started by: Omkumar
1 Replies
GIT-DIFFTOOL(1) Git Manual GIT-DIFFTOOL(1)
NAME
git-difftool - Show changes using common diff tools
SYNOPSIS
git difftool [<options>] [<commit> [<commit>]] [--] [<path>...]
DESCRIPTION
git difftool is a git command that allows you to compare and edit files between revisions using common diff tools. git difftool is a
frontend to git diff and accepts the same options and arguments. See git-diff(1).
OPTIONS
-y, --no-prompt
Do not prompt before launching a diff tool.
--prompt
Prompt before each invocation of the diff tool. This is the default behaviour; the option is provided to override any configuration
settings.
-t <tool>, --tool=<tool>
Use the diff tool specified by <tool>. Valid diff tools are: araxis, bc3, deltawalker, diffuse, emerge, ecmerge, gvimdiff, kdiff3,
kompare, meld, opendiff, p4merge, tkdiff, vimdiff and xxdiff.
If a diff tool is not specified, git difftool will use the configuration variable diff.tool. If the configuration variable diff.tool is
not set, git difftool will pick a suitable default.
You can explicitly provide a full path to the tool by setting the configuration variable difftool.<tool>.path. For example, you can
configure the absolute path to kdiff3 by setting difftool.kdiff3.path. Otherwise, git difftool assumes the tool is available in PATH.
Instead of running one of the known diff tools, git difftool can be customized to run an alternative program by specifying the command
line to invoke in a configuration variable difftool.<tool>.cmd.
When git difftool is invoked with this tool (either through the -t or --tool option or the diff.tool configuration variable) the
configured command line will be invoked with the following variables available: $LOCAL is set to the name of the temporary file
containing the contents of the diff pre-image and $REMOTE is set to the name of the temporary file containing the contents of the diff
post-image. $MERGED is the name of the file which is being compared. $BASE is provided for compatibility with custom merge tool
commands and has the same value as $MERGED.
-x <command>, --extcmd=<command>
Specify a custom command for viewing diffs. git-difftool ignores the configured defaults and runs $command $LOCAL $REMOTE when this
option is specified. Additionally, $BASE is set in the environment.
-g, --gui
When git-difftool is invoked with the -g or --gui option the default diff tool will be read from the configured diff.guitool variable
instead of diff.tool.
See git-diff(1) for the full list of supported options.
CONFIG VARIABLES
git difftool falls back to git mergetool config variables when the difftool equivalents have not been defined.
diff.tool
The default diff tool to use.
diff.guitool
The default diff tool to use when --gui is specified.
difftool.<tool>.path
Override the path for the given tool. This is useful in case your tool is not in the PATH.
difftool.<tool>.cmd
Specify the command to invoke the specified diff tool.
See the --tool=<tool> option above for more details.
difftool.prompt
Prompt before each invocation of the diff tool.
SEE ALSO
git-diff(1)
Show changes between commits, commit and working tree, etc
git-mergetool(1)
Run merge conflict resolution tools to resolve merge conflicts
git-config(1)
Get and set repository or global options
GIT
Part of the git(1) suite
Git 1.7.10.4 11/24/2012 GIT-DIFFTOOL(1)