07-14-2011
Since my edit function is not working - here a short addition: The delimeter with sort ("|") is not used, you can leave it out in your example.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I need to chope the header and footer record from an input file and make a new output file, please let me know how i can do it in unix.thanks. (4 Replies)
Discussion started by: coolbudy
4 Replies
2. Shell Programming and Scripting
I am trying to get a total number of tapes w/out headers or footers in a ERV file and append it to the file. For some reason I cannot get it to work. Any ideas?
#!/bin/sh
dat=`date +"%b%d_%Y"`
+ date +%b%d_%Y
dat=Nov16_2006
tapemgr="/export/home/legato/tapemgr/rpts"... (1 Reply)
Discussion started by: gzs553
1 Replies
3. UNIX for Dummies Questions & Answers
Hello gurus,
I have a file in a tab delimited format and a header row. I need a code to delete the header in the file, and convert the file to a fixed width format, with all the columns aligned. Below is a sample of the file:... (4 Replies)
Discussion started by: chumsky
4 Replies
4. Shell Programming and Scripting
I am having report file with header and footer . The details in between header and footer are separated by a pipe charater. I want to sort the file by considering multiple columns in between header and footer.
pls help (4 Replies)
Discussion started by: suryanarayana
4 Replies
5. Shell Programming and Scripting
This is my file(Target.txt)
name|age|locaction
abc|23|del
xyz|24|mum
jkl|25|kol
The file should be like this
1|03252012
1|name|age|location
2|abc|23|del
2|xyz|24|mum
2|jkl|25|kol
2|kkk|26|hyd
3|4
Column 1 is row indicator
for row 1 and 2, column indicator is 1,for data rows... (1 Reply)
Discussion started by: itsranjan
1 Replies
6. Shell Programming and Scripting
Hi Every one,
what is the coomand to remove header or footer from a file.
Please help me by providing command/syntax to remove header/footer from unix.
Thanks in advance for all your support. (5 Replies)
Discussion started by: sridhardwh
5 Replies
7. Shell Programming and Scripting
currently I've a file
Insert into CD_CARD_TYPE
(CODE, DESCRIPTION, LAST_UPDATE_BY, LAST_UPDATE_DATE)
Values
('024', '024', 2, sysdate);
Insert into CD_CARD_TYPE
(CODE, DESCRIPTION, LAST_UPDATE_BY, LAST_UPDATE_DATE)
Values
('032', '032', 2, sysdate);
........
is it... (3 Replies)
Discussion started by: jediwannabe
3 Replies
8. UNIX for Dummies Questions & Answers
Is there any command to eliminate Header and footer from EBCDIC file (4 Replies)
Discussion started by: abhilashnair
4 Replies
9. Post Here to Contact Site Administrators and Moderators
HI Everyone,
I have below source file
AAA|NAME1|ADDRESS1|300.20
BBB|NAME2|ADDRESS2|400.31
CCC|NAME3|ADDRESS3|300.34
I have requirement where I need to sum up fourth field in above fixed width pipe delimited flat file. When I use below code, it gives me value 1001.00
But I am expecting... (1 Reply)
Discussion started by: patricjemmy6
1 Replies
10. Shell Programming and Scripting
Hi Forum.
I have the following script that splits a large fixed-width file into smaller multiple fixed-width files based on input segment type.
The main command in the script is:
awk -v search_col_pos=$search_col_pos -v search_str_len=$search_str_len -v segment_type="$segment_type"... (8 Replies)
Discussion started by: pchang
8 Replies
LEARN ABOUT SUSE
git-revert
GIT-REVERT(1) Git Manual GIT-REVERT(1)
NAME
git-revert - Revert an existing commit
SYNOPSIS
git revert [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit>
DESCRIPTION
Given one existing commit, revert 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).
Note: git revert is used to record a new commit to reverse the effect of an earlier commit (often a faulty one). If you want to throw away
all uncommitted changes in your working directory, you should see git-reset(1), particularly the --hard option. If you want to extract
specific files as they were in another commit, you should see git-checkout(1), specifically the git checkout <commit> -- <filename> syntax.
Take care with these alternatives as both will discard uncommitted changes in your working directory.
OPTIONS
<commit>
Commit to revert. For a more complete list of ways to spell commit names, see "SPECIFYING REVISIONS" section in git-rev-parse(1).
-e, --edit
With this option, git revert will let you edit the commit message prior to committing the revert. This is the default if you run the
command from a terminal.
-m parent-number, --mainline parent-number
Usually you cannot revert 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 revert to reverse the change relative to the specified parent.
Reverting a merge commit declares that you will never want the tree changes brought in by the merge. As a result, later merges will
only bring in tree changes introduced by commits that are not ancestors of the previously reverted merge. This may or may not be what
you want.
See the revert-a-faulty-merge How-To[1] for more details.
--no-edit
With this option, git revert will not start the commit message editor.
-n, --no-commit
Usually the command automatically creates a commit with a commit log message stating which commit was reverted. This flag applies the
change necessary to revert 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 revert is done against the beginning state of your index.
This is useful when reverting 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.
AUTHOR
Written by Junio C Hamano <gitster@pobox.com[2]>
DOCUMENTATION
Documentation by Junio C Hamano and the git-list <git@vger.kernel.org[3]>.
GIT
Part of the git(1) suite
NOTES
1. revert-a-faulty-merge How-To
file:///usr/share/doc/git-doc/howto/revert-a-faulty-merge.txt
2. gitster@pobox.com
mailto:gitster@pobox.com
3. git@vger.kernel.org
mailto:git@vger.kernel.org
Git 1.7.1 07/05/2010 GIT-REVERT(1)