08-06-2014
Sorry, my crystal ball is in repair. WHAT is not working?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello, I have a file, and one column has both positive and negative numbers. Does anyone know how I can calculate the total of all the values (i.e, +ve and -ve).
eg:
col1 col2 col3
data 23 data
data 76 data
data -30 data
Thanks
Khoom (1 Reply)
Discussion started by: Khoomfire
1 Replies
2. UNIX for Dummies Questions & Answers
Hi everybody,
I've got a file with 36074 fields. I need to insert an additional new columns 2,3,4 and 5 after the first field. The columns to insert are the same for all the lines: it's "1" doe the new field 2 and "0" for the rest. I did have a look in the forum and the suggested solution I... (7 Replies)
Discussion started by: zajtat
7 Replies
3. Shell Programming and Scripting
Hello,
I'm struggling with the following problem in sh script:
Adding a column to the right-end of a file ("master-file": non-constant column number, tab and linux formatted) where the column is the 4th one of file1 (space and DOS formatted)
Changing the header of column 4 of file 1 at the... (4 Replies)
Discussion started by: lco
4 Replies
4. Shell Programming and Scripting
Hi All,
I have a file example.csv which looks like this
GrpID,TargetID,Signal,Avg_Num
CSCH74_1_1,2007,61,256
CSCH74_1_1,212007,647,679
CSCH74_1_1,12007,3,32
CSCH74_1_1,207,299,777
I want the output as
GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num
CSCH74_1_1,2007,61,256... (4 Replies)
Discussion started by: Vavad
4 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I have a file example.csv which looks like this
GrpID,TargetID,Signal,Avg_Num
CSCH74_1_1,2007,61,256
CSCH74_1_1,212007,647,679
CSCH74_1_1,12007,3,32
CSCH74_1_1,207,299,777
I want the output as
GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num
CSCH74_1_1,2007,61,256... (1 Reply)
Discussion started by: Vavad
1 Replies
6. Shell Programming and Scripting
Hi everyone!
I sometimes need to do some simple arithmetics, like adding a number to a certain column of a file. So I wrote a small function in the .bashrc file, which looks like this
shifter()
{
COL=$1
VAL=$2
FILE=$3
cp $FILE $FILE.shifted
awk 'NF==4 {$(( $COL )) = $(( $COL ))... (6 Replies)
Discussion started by: radudownload
6 Replies
7. Shell Programming and Scripting
Hi
cat /tmp/xx.txt
1 4
1 5
1 6
2 1
2 1
2 1
i want to add the values of 2nd column resepect to 1st column values..for 1 in 1st column i need sum of all the values in 2nd column ..pls tell me hw to do it?? (8 Replies)
Discussion started by: Aditya.Gurgaon
8 Replies
8. Shell Programming and Scripting
Hello,
I have a data such as this:
ENSGALG00000000189 329 G A 4 2 0
ENSGALG00000000189 518 T C 5 1 0
ENSGALG00000000189 1104 G A 5 1 0
ENSGALG00000000187 3687 G T 5 1 0
ENSGALG00000000187 4533 A T 4 2 0
ENSGALG00000000233 5811 T C 4 2 0
ENSGALG00000000233 5998 C A 5 1 0
I want to... (3 Replies)
Discussion started by: Homa
3 Replies
9. Shell Programming and Scripting
Hi Team,
I would like to add two dummy columns at the end of the file. I know how to add the columns using awk . Here is my problem. we have bit strange delimiter
when I od -bc it shows 244 as its binary value.
0002200 060 244 060 244 060 244 066 065 244 060 244 244 012
0... (1 Reply)
Discussion started by: gvkumar25
1 Replies
10. Shell Programming and Scripting
Hello ,
My requirement is to add additional column sequentially to a text file based on the column value -
i/p file
id1|varchar
id2|varchar
id3|number
id4|number
id5|date
id6|date
---------------------------------------
o/p file
colv1|id1 (if second column value is varchar then... (3 Replies)
Discussion started by: Pratik4891
3 Replies
LEARN ABOUT DEBIAN
stg-repair
STG-REPAIR(1) StGit Manual STG-REPAIR(1)
NAME
stg-repair - Fix StGit metadata if branch was modified with git commands
SYNOPSIS
stg repair
DESCRIPTION
If you modify an StGit stack (branch) with some git commands -- such as commit, pull, merge, and rebase -- you will leave the StGit
metadata in an inconsistent state. In that situation, you have two options:
1. Use "stg undo" to undo the effect of the git commands. (If you know what you are doing and want more control, "git reset" or similar
will work too.)
2. Use "stg repair". This will fix up the StGit metadata to accomodate the modifications to the branch. Specifically, it will do the
following:
o If you have made regular git commits on top of your stack of StGit patches, "stg repair" makes new StGit patches out of them,
preserving their contents.
o However, merge commits cannot become patches; if you have committed a merge on top of your stack, "repair" will simply mark all
patches below the merge unapplied, since they are no longer reachable. If this is not what you want, use "stg undo" to get rid of
the merge and run "stg repair" again.
o The applied patches are supposed to be precisely those that are reachable from the branch head. If you have used e.g. "git reset"
to move the head, some applied patches may no longer be reachable, and some unapplied patches may have become reachable. "stg
repair" will correct the appliedness of such patches.
"stg repair" will fix these inconsistencies reliably, so as long
as you like what it does, you have no reason to avoid causing
them in the first place. For example, you might find it
convenient to make commits with a graphical tool and then have
"stg repair" make proper patches of the commits.
Note
If using git commands on the stack was a mistake, running "stg repair" is not what you want. In that case, what you want is option (1)
above.
STGIT
Part of the StGit suite - see linkman:stg[1]
StGit 03/13/2012 STG-REPAIR(1)