11-13-2009
Hi summer cherry,
Thanks for your help.
However, from your code, where should I put my code?
Thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello All.
I am having a directory /tmp/rahul which contains many files in the format
@#home@#rahul@#programs@#script.pl
where /home/rahul/programs is the directory where the script.pl file is to be placed.
I have many files in this format.
What i want is a script which read these... (7 Replies)
Discussion started by: rahulrathod
7 Replies
2. Shell Programming and Scripting
I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies
3. UNIX for Dummies Questions & Answers
I tried searching for this, but I might have used the wrong terms as I couldn't find answers to this question.
I'm looking for a way to replace all files with a certain filename with another file within a specific directory including all of it's subdirectory using a shell-script. (2 Replies)
Discussion started by: Schmellsera
2 Replies
4. Shell Programming and Scripting
Hello, I know how to join multiple files using the cat function. I want to do something a little more advanced. Basically I want to put the filename in the first column...
One thing to note is that the file is tab delimited.
e.g.
file1.txt
joe 1 4 5 6 7 3
manny 2 3 4 5 6 7
... (4 Replies)
Discussion started by: phil_heath
4 Replies
5. Shell Programming and Scripting
Hello everyone!!
I am not completely new to shell script but I havent been able to find the answer to my problem and I'm sure there are some smart brains here up for the challenge :D.
I have several CSV files that I need to combine into one, but I also need to know where each row came from.... (7 Replies)
Discussion started by: fransanchezoria
7 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
Thanks in Advance
I am working on a shell script. I need some assistance.
My Requirement:
1) There are some set of files in a directory like given below
OTP_UFSC_20120530000000_acc.csv
OTP_UFSC_20120530000000_faf.csv
OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Discussion started by: aealexanderraj
0 Replies
7. Programming
Hi All,
Thanks in Advance
I am working on a shell script. I need some assistance.
My code:
if
then
set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\
"pam_account";
for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Discussion started by: aealexanderraj
0 Replies
8. Shell Programming and Scripting
Hello,
Although I have found similar questions, I could not find advice that could help with our problem.
The issue:
We have a few thousands text files (books).
Each book has many chapters. Each chapter is identified by a cite-key. We need
to split each of those book files by... (4 Replies)
Discussion started by: samask
4 Replies
9. Open Source
I have a process that requires me to read data from huge log files and find the most recent entry on a per-user basis. The number of users may fluctuate wildly month to month, so I can't code for it with names or a set number of variables to capture the data, and the files are large so I don't... (7 Replies)
Discussion started by: rbatte1
7 Replies
10. UNIX for Beginners Questions & Answers
Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies
LEARN ABOUT MOJAVE
git-cherry
GIT-CHERRY(1) Git Manual GIT-CHERRY(1)
NAME
git-cherry - Find commits yet to be applied to upstream
SYNOPSIS
git cherry [-v] [<upstream> [<head> [<limit>]]]
DESCRIPTION
Determine whether there are commits in <head>..<upstream> that are equivalent to those in the range <limit>..<head>.
The equivalence test is based on the diff, after removing whitespace and line numbers. git-cherry therefore detects when commits have been
"copied" by means of git-cherry-pick(1), git-am(1) or git-rebase(1).
Outputs the SHA1 of every commit in <limit>..<head>, prefixed with - for commits that have an equivalent in <upstream>, and + for commits
that do not.
OPTIONS
-v
Show the commit subjects next to the SHA1s.
<upstream>
Upstream branch to search for equivalent commits. Defaults to the upstream branch of HEAD.
<head>
Working branch; defaults to HEAD.
<limit>
Do not report commits up to (and including) limit.
EXAMPLES
Patch workflows
git-cherry is frequently used in patch-based workflows (see gitworkflows(7)) to determine if a series of patches has been applied by the
upstream maintainer. In such a workflow you might create and send a topic branch like this:
$ git checkout -b topic origin/master
# work and create some commits
$ git format-patch origin/master
$ git send-email ... 00*
Later, you can see whether your changes have been applied by saying (still on topic):
$ git fetch # update your notion of origin/master
$ git cherry -v
Concrete example
In a situation where topic consisted of three commits, and the maintainer applied two of them, the situation might look like:
$ git log --graph --oneline --decorate --boundary origin/master...topic
* 7654321 (origin/master) upstream tip commit
[... snip some other commits ...]
* cccc111 cherry-pick of C
* aaaa111 cherry-pick of A
[... snip a lot more that has happened ...]
| * cccc000 (topic) commit C
| * bbbb000 commit B
| * aaaa000 commit A
|/
o 1234567 branch point
In such cases, git-cherry shows a concise summary of what has yet to be applied:
$ git cherry origin/master topic
- cccc000... commit C
+ bbbb000... commit B
- aaaa000... commit A
Here, we see that the commits A and C (marked with -) can be dropped from your topic branch when you rebase it on top of origin/master,
while the commit B (marked with +) still needs to be kept so that it will be sent to be applied to origin/master.
Using a limit
The optional <limit> is useful in cases where your topic is based on other work that is not in upstream. Expanding on the previous example,
this might look like:
$ git log --graph --oneline --decorate --boundary origin/master...topic
* 7654321 (origin/master) upstream tip commit
[... snip some other commits ...]
* cccc111 cherry-pick of C
* aaaa111 cherry-pick of A
[... snip a lot more that has happened ...]
| * cccc000 (topic) commit C
| * bbbb000 commit B
| * aaaa000 commit A
| * 0000fff (base) unpublished stuff F
[... snip ...]
| * 0000aaa unpublished stuff A
|/
o 1234567 merge-base between upstream and topic
By specifying base as the limit, you can avoid listing commits between base and topic:
$ git cherry origin/master topic base
- cccc000... commit C
+ bbbb000... commit B
- aaaa000... commit A
SEE ALSO
git-patch-id(1)
GIT
Part of the git(1) suite
Git 2.17.1 10/05/2018 GIT-CHERRY(1)