10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to change the number in bold to 2400
01,000300032,193631306,190619,0640,1,80,,2/
02,193631306,000300032,1,190618,0640,CAD,2/
I'm not sure if sed or awk is the answer. I was going to use sed and do a character count up to that point, but that column directly before 0640 might... (8 Replies)
Discussion started by: juggernautjoee
8 Replies
2. Shell Programming and Scripting
I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :).
grep
grep -v -F -f targets.bed sort_list
grep -vFf sort_list targets
awk
awk -F, '
> FILENAME == ARGV {to_remove=1; next}
> ! ($5 in... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I've got a file that has 12 fields. I've merged 2 files and there will be some duplicates in the following:
FILE:
1. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, 100
2. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, (EMPTY)
3. CDC, 54321, TEST3,... (4 Replies)
Discussion started by: tugar
4 Replies
4. Shell Programming and Scripting
Hi all,
I want to remove empty field in a text file. I tried to used sed. But it failed.
Input:
LG10_PM_map_19_LEnd 1000560 G AG AG
LG10_PM_map_19_LEnd 1005621 G AG
LG10_PM_map_19_LEnd 1011214 A AG AG
LG10_PM_map_19_LEnd 1011673 T CT CT ... (3 Replies)
Discussion started by: huiyee1
3 Replies
5. Shell Programming and Scripting
I am trying to see if I can use awk to remove duplicates from a file. This is the file:
-==> Listvol <==
deleting /vol/eng_rmd_0941
deleting /vol/eng_rmd_0943
deleting /vol/eng_rmd_0943
deleting /vol/eng_rmd_1006
deleting /vol/eng_rmd_1012
rearrange /vol/eng_rmd_0943
... (6 Replies)
Discussion started by: newbie2010
6 Replies
6. Shell Programming and Scripting
Hi,
I need help to remove tab delimited space in the $2 of a specific row. My file is like this:-
file1.txt
No_1 4 139 156
No_1 5 161 205
No_4 91 227 212
No_19 254 243 263
No_19 645 249 258
No_19 101 2492 2635
No_90 8 277 288... (5 Replies)
Discussion started by: redse171
5 Replies
7. UNIX for Dummies Questions & Answers
Hi all !
I'm sure it is a basic question but I didn't find any threads that fit my need.
How to remove empty fields with awk?
Or in other words, how to shift all the fields after an empty field on the left?
input:
1|2||3|4|5||6
wanted:
1|2|3|4|5|6
I tried:
awk '{for(i=1; i<=NF;... (7 Replies)
Discussion started by: lucasvs
7 Replies
8. Shell Programming and Scripting
I was just looking at this post: https://www.unix.com/shell-programming-scripting/22893-delete-multiple-empty-lines.html.
and I am looking to achieve the same with sed. So the idea is to delete lines from a file where a certain field has no value.
Inputfile:
EMID MMDDYY HOURS JOB EMNAME
0241... (4 Replies)
Discussion started by: figaro
4 Replies
9. Shell Programming and Scripting
Hi,
I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it.
Here is how the text file looks:
_______________________________________________________
DEVICE STATUS INFORMATION FOR LOCATION 1:
OPER STATES: Disabled E:Enabled ... (5 Replies)
Discussion started by: Issemael
5 Replies
10. Shell Programming and Scripting
Hi
I have a file which looks like this
name: Sally group: Group4
name: Tim group: Group1
name: Dan group: Group2
name: Chris group: Group3
name: Peter group:
name: Fred group:
name: Mary group: Group2
Well I want to get rid of the... (4 Replies)
Discussion started by: bombcan
4 Replies