8 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
This is my first post here.
I am using cygwin on Windows 7.
I am starting with a data file with filename "name_1.ext", like "20180831_snapgenotypes_1.csv".
The "_1" before ".ext" is a version number. Integers (0-99) are sufficient. They don't have to be like "1.0.0".
The filename may... (2 Replies)
Discussion started by: minimalist
2 Replies
2. UNIX for Advanced & Expert Users
Two questions:
1) Is there a way to create a new column (i.e. ID) to an existing file containing data and the new column ID populate as an auto incrementing number?
for example:
(Current file has headers and is PIPE delimited.)
**data looks like this**
"COL1"|"COL2"|"COL3"|"COL4"|"COL5"... (4 Replies)
Discussion started by: timlisa20
4 Replies
3. UNIX for Dummies Questions & Answers
Hello All,
In the below script i am trying to check and list the file names, get the last file with highest version number and then increment the version number when i create another file. Example: file1 is COBANK_v1.xml and file2 i want to put it as COBANK_v2.xml, to achieve this i am using awk... (15 Replies)
Discussion started by: Ariean
15 Replies
4. Shell Programming and Scripting
Hello,
Here's a file of mine:
key1:431
key2:159
key3:998
I need to change these keys to something bigger - and I actually need to shift them all by a range of 3.
The output would be:
key1:434
key2:162
key3:1001
I can't find the propper sed/awk line that would alter all my... (4 Replies)
Discussion started by: fzd
4 Replies
5. Shell Programming and Scripting
Hi All,
I have the input file(.csv) like below.
SNo,Step,Data
1,0,1
2,0,2
3,1,1
4,2,2
5,0,3
6,0,4
and I need the following output.
1,0,1
2,0,2
3,1,1
4,2,2
5,3,3
6,3,4 (5 Replies)
Discussion started by: ks_reddy
5 Replies
6. Shell Programming and Scripting
Hi All,
I need read the file and out put format as below using ksh, I wrote below script its keep on repeating first line in the file.
may i know the best way to get the below out put while incrementing line in the file.
cat b.txt |awk '{print $0}' |while read line
do
aa=`cat $line |head -1... (7 Replies)
Discussion started by: ashanabey
7 Replies
7. Shell Programming and Scripting
So I have this input
1 10327 rs112750067 T C . PASS DP=65;AF=0.208;CB=BC,NCBI
1 10469 rs117577454 C G . PASS DP=2055;AF=0.020;CB=UM,BC,NCBI
1 10492 rs55998931 C T . PASS DP=231;AF=0.167;CB=BC,NCBI
1 10583 rs58108140 G A ... (3 Replies)
Discussion started by: kellywilliams
3 Replies
8. Shell Programming and Scripting
Hi
I wrote this script with the help of you guyz.My next challenge is to increment the port using single file.So far iam using this code to increment hp1 and hp2 .To increment port numbers, iam using two different files (.default_port_hp1 and .default_port_hp2).The challenge for me is to use... (0 Replies)
Discussion started by: coolkid
0 Replies