10-15-2008
Thanks otheus & summer cherry.
I got it all figured out and learned something while I was at it.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
My awk program is failing. I figured out using command
od -c filename
that the last line of the file doesnt end with a new line character.
Mine is an automated process because of this data is missing.
How do i handle this?
I want to append new line character at the end of last... (2 Replies)
Discussion started by: pinnacle
2 Replies
2. Shell Programming and Scripting
Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt.
and i am stuck.
list=`cat /u/Test/programs`;
psg "ServTest" | awk -v listawk=$list '{
cmd_name=($5 ~ /^/)? $9:$8
for(pgmname in listawk)
... (6 Replies)
Discussion started by: Anteus
6 Replies
3. Shell Programming and Scripting
I have several hundreds of tiny files which need to be concatenated into one single line and all those in a single file. Some files have several blank lines. Tried to use this script but failed on it.
awk 'END { print r } r && !/^/ { print FILENAME, r; r = "" }{ r = r ? r $0 : $0 }' *.txt... (8 Replies)
Discussion started by: sdf
8 Replies
4. Shell Programming and Scripting
Hey, not too good at this, so I only managed a clumsy and SLOW solution to my problem that needs a drastic speed up. Any ideas how I write the following in awk only?
Code is supposed to do...
For every line read column values $6, $7, $8 and do a calculation with the same column values of every... (6 Replies)
Discussion started by: origamisven
6 Replies
5. Shell Programming and Scripting
Say I have a text file, with several lines. Each line may contain spaces or the # symbol.
For each line, I want to pass that line as the path of a file, in order to add it to a tar file.
I've tried this but doesn't work:
cat contents.txt | xargs -0 `tar -uvf contents.tar $1`Any ideas?
... (3 Replies)
Discussion started by: Tribe
3 Replies
6. Shell Programming and Scripting
I have a script that builds a database ~30 million lines, ~3.7 GB .cvs file. After multiple optimzations It takes about 62 min to bring in and parse all the files and used to take 10 min to remove duplicates until I was requested to add another column. I am using the highly optimized awk code:
awk... (34 Replies)
Discussion started by: Michael Stora
34 Replies
7. Shell Programming and Scripting
hi,
i'm trying to write a tcsh script that reads in a text file (one column) and the runs a different command for each line of text.
i've found lots of example commands for bash, but not for tcsh.
can anyone give me a hint?
thanks,
jill (8 Replies)
Discussion started by: giuinha
8 Replies
8. UNIX for Beginners Questions & Answers
I cannot seem to get what should be a simple awk one-liner to work correctly and cannot figure out why. I would like to use patterns from a specific field in one file as regex to search for matching strings in the entire line ($0) of another file.
I would like to output the lines of File2 which... (1 Reply)
Discussion started by: jvoot
1 Replies
9. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
10. UNIX for Beginners Questions & Answers
In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT SUSE
git-cherry-pick
GIT-CHERRY-PICK(1) Git Manual GIT-CHERRY-PICK(1)
NAME
git-cherry-pick - Apply the change introduced by an existing commit
SYNOPSIS
git cherry-pick [--edit] [-n] [-m parent-number] [-s] [-x] [--ff] <commit>
DESCRIPTION
Given one existing commit, apply the change the patch introduces, and record a new commit that records it. This requires your working tree
to be clean (no modifications from the HEAD commit).
OPTIONS
<commit>
Commit to cherry-pick. For a more complete list of ways to spell commits, see the "SPECIFYING REVISIONS" section in git-rev-parse(1).
-e, --edit
With this option, git cherry-pick will let you edit the commit message prior to committing.
-x
When recording the commit, append to the original commit message a note that indicates which commit this change was cherry-picked from.
Append the note only for cherry picks without conflicts. Do not use this option if you are cherry-picking from your private branch
because the information is useless to the recipient. If on the other hand you are cherry-picking between two publicly visible branches
(e.g. backporting a fix to a maintenance branch for an older release from a development branch), adding this information can be useful.
-r
It used to be that the command defaulted to do -x described above, and -r was to disable it. Now the default is not to do -x so this
option is a no-op.
-m parent-number, --mainline parent-number
Usually you cannot cherry-pick a merge because you do not know which side of the merge should be considered the mainline. This option
specifies the parent number (starting from 1) of the mainline and allows cherry-pick to replay the change relative to the specified
parent.
-n, --no-commit
Usually the command automatically creates a commit. This flag applies the change necessary to cherry-pick the named commit to your
working tree and the index, but does not make the commit. In addition, when this option is used, your index does not have to match the
HEAD commit. The cherry-pick is done against the beginning state of your index.
This is useful when cherry-picking more than one commits' effect to your index in a row.
-s, --signoff
Add Signed-off-by line at the end of the commit message.
--ff
If the current HEAD is the same as the parent of the cherry-pick'ed commit, then a fast forward to this commit will be performed.
AUTHOR
Written by Junio C Hamano <gitster@pobox.com[1]>
DOCUMENTATION
Documentation by Junio C Hamano and the git-list <git@vger.kernel.org[2]>.
GIT
Part of the git(1) suite
NOTES
1. gitster@pobox.com
mailto:gitster@pobox.com
2. git@vger.kernel.org
mailto:git@vger.kernel.org
Git 1.7.1 07/05/2010 GIT-CHERRY-PICK(1)