04-06-2010
Shell Script: Compare 2 Files and Extract Unique Elements of Each File into 2 New Files
Thanks Danmero! Exactly what I was looking for!
-Matt
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Can anyone provide me any checklists or a list of steps I should follow before executing my scripts.
Could also tell me if there are any other standards to be followed while shell programming like naming conventions for variables etc.
Your help would be much appreciated.
Regards,... (2 Replies)
Discussion started by: srikanth_ksv
2 Replies
2. Shell Programming and Scripting
Below is a description of what im trying to achieve:
Write a shell script to concatenate lists together, and output the resulting list. Do not include any argument that is a sub-list of the entire list. (The script will clean the list of any redundant items.) You must preserve the original order... (1 Reply)
Discussion started by: rfourn
1 Replies
3. Shell Programming and Scripting
Hi, I need a script that will:
1. Go through about 20 different folders, each containing about 20 1d files. The 1d files go something like this:
22.253 37.707 78.117 112.374 127.944 156.067 180.956 233.785 249.256 ... (1 Reply)
Discussion started by: ac130pilot
1 Replies
4. Shell Programming and Scripting
Hello Unix Gurus,
I have:
A list of parameters that repeat (in .txt file)
Example: params.txt
Series: XYZ
Manufacturer: ...
Software Version: ...
Year made: ...
Series Series: XYZ
Manufacturer: ...
Software Version: ...
Year made: ...
Series Series: ABC
Manufacturer: ...
... (7 Replies)
Discussion started by: lapiduslost
7 Replies
5. Shell Programming and Scripting
Hi,
I do little bash scripting so sorry for my ignorance.
How do I compare if the two variable not match and if they do not match run a command.
I was thinking a for loop but then I need another for loop for the 2nd list and I do not think that would work as in the real world there could... (2 Replies)
Discussion started by: GermanJulian
2 Replies
6. Shell Programming and Scripting
Hello, I'm trying to write a script which is listing files based on different preferences, like filetype or permissions. All is fine, except for one: I want to list files in /home which has a different owner than the home directory it is in.
Here is an example:
/home/UserA is the directory, and... (10 Replies)
Discussion started by: Zwiebi
10 Replies
7. Shell Programming and Scripting
I expert,
I may cross post something similar but I dirtyed my quesion somehow to be clear in the thread
#cat file1
88dee gcc: Grok for callconvention-hard to enable hard float
a2ad2 eglibc: package mtrace separately
61487 python: bump PR of packages after update of distutils.bbclass... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
8. Shell Programming and Scripting
I have a file which has connections given as:
A B 0.1
B C 5.8
C B 5.8
E F 0.67
B A 0.1
A B and B A are same, so I want to remove one of them. Same with BC and CB.
Desired output:
A B 0.1
B C 5.8
E F 0.67 (2 Replies)
Discussion started by: Sanchari
2 Replies
9. Shell Programming and Scripting
help me (1 Reply)
Discussion started by: sonu pandey
1 Replies
10. UNIX for Beginners Questions & Answers
I have a script that sorts and processes unsorted files to newly created directories.
Its working great, but I am trying to understand the leanest method to get the script to create an additional file within each newly created directory that:
Contains a list of all files in the directory... (4 Replies)
Discussion started by: Braveheart
4 Replies
LEARN ABOUT DEBIAN
hgignore
HGIGNORE(5) Mercurial Manual HGIGNORE(5)
NAME
hgignore - syntax for Mercurial ignore files
SYNOPSIS
The Mercurial system uses a file called .hgignore in the root directory of a repository to control its behavior when it searches for files
that it is not currently tracking.
DESCRIPTION
The working directory of a Mercurial repository will often contain files that should not be tracked by Mercurial. These include backup
files created by editors and build products created by compilers. These files can be ignored by listing them in a .hgignore file in the
root of the working directory. The .hgignore file must be created manually. It is typically put under version control, so that the settings
will propagate to other repositories with push and pull.
An untracked file is ignored if its path relative to the repository root directory, or any prefix path of that path, is matched against any
pattern in .hgignore.
For example, say we have an untracked file, file.c, at a/b/file.c inside our repository. Mercurial will ignore file.c if any pattern in
.hgignore matches a/b/file.c, a/b or a.
In addition, a Mercurial configuration file can reference a set of per-user or global ignore files. See the ignore configuration key on the
[ui] section of hg help config for details of how to configure these files.
To control Mercurial's handling of files that it manages, many commands support the -I and -X options; see hg help <command> and hg help
patterns for details.
SYNTAX
An ignore file is a plain text file consisting of a list of patterns, with one pattern per line. Empty lines are skipped. The # character
is treated as a comment character, and the character is treated as an escape character.
Mercurial supports several pattern syntaxes. The default syntax used is Python/Perl-style regular expressions.
To change the syntax used, use a line of the following form:
syntax: NAME
where NAME is one of the following:
regexp
Regular expression, Python/Perl syntax.
glob
Shell-style glob.
The chosen syntax stays in effect when parsing all patterns that follow, until another syntax is selected.
Neither glob nor regexp patterns are rooted. A glob-syntax pattern of the form *.c will match a file ending in .c in any directory, and a
regexp pattern of the form .c$ will do the same. To root a regexp pattern, start it with ^.
Note Patterns specified in other than .hgignore are always rooted. Please see hg help patterns for details.
EXAMPLE
Here is an example ignore file.
# use glob syntax.
syntax: glob
*.elc
*.pyc
*~
# switch to regexp syntax.
syntax: regexp
^.pc/
AUTHOR
Vadim Gelfer <vadim.gelfer@gmail.com>
Mercurial was written by Matt Mackall <mpm@selenic.com>.
SEE ALSO
hg(1), hgrc(5)
COPYING
This manual page is copyright 2006 Vadim Gelfer. Mercurial is copyright 2005-2012 Matt Mackall. Free use of this software is granted
under the terms of the GNU General Public License version 2 or any later version.
AUTHOR
Vadim Gelfer <vadim.gelfer@gmail.com>
Organization: Mercurial
HGIGNORE(5)