10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
When your data is consistent it is easy to use awk with multiple lines like this. Can we please make this portable so I can use this in both RHEL and AIX?
awk '{RS="/directory1" } $7 ~ /drwxr-xr-x/ {print $1 " " $7}' file
What do I do when the data is not consistent? When your data is not... (2 Replies)
Discussion started by: cokedude
2 Replies
2. Shell Programming and Scripting
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
3. Shell Programming and Scripting
Hi,
I have multiple files that each contain four columns of strings:
File1:
Code:
123 abc gfh 273
456 ddff jfh 837
789 ghi u4u 395
File2:
Code:
123 abc dd fu
456 def 457 nd
891 384 djh 783
I want to compare the strings in Column 1 of File 1 with each other file and Print in... (3 Replies)
Discussion started by: owwow14
3 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I'm struggling to filter my data frame. I need to print only those lines whose max value (the number of columns may vary) is above a cut-off value.
My data looks like this:
chr22 17565753 17565754 5 4 5 5 6 2 5 5 6 2
chr22 17565754 ... (2 Replies)
Discussion started by: lsantome
2 Replies
5. Shell Programming and Scripting
Hi Experts,
I have a data with multiple entry , I want to filter PKG= & the last column "00060110" or "00088150" in the output
file:
###############################################################################################
PKG= P8SDB :: VGS = vgP8SOra vgP8SDB1 vgP8S001... (5 Replies)
Discussion started by: rveri
5 Replies
6. Shell Programming and Scripting
AWK Gurus,
data:
srvhcm01 AZSCI
srvhcm01 AZSDB
srvhcm01 BZSDB
srvhcm01 E2QDI31
srvhcm01 YPDCI
srvhcm01 YPDDB
srvhcm01 UV2FSCR
srvhcm01 UV2FSBI
srvhcm01 UV2FSXI
srvhcm01 UV2FSUC
srvhcm01 UV2FSEP
srvhcm01 UV2FSRE
srvhcm01 NASCI
srvhcm01 NASDB
srvhcm01 UV2FSSL
srvhcm01 UV2FSDI (7 Replies)
Discussion started by: rveri
7 Replies
7. Shell Programming and Scripting
Hi,
Input
7488 7389 chr1.fa chr1.fa
3546 9887 chr5.fa chr9.fa
7387 7898 chrX.fa chr3.fa
7488 7389 chr21.fa chr3.fa
7488 7389 chr1.fa chr1.fa
3546 9887 chr9.fa chr5.fa
7898 7387 chrX.fa chr3.fa
Desired Output
7488 7389 chr1.fa chr1.fa 2
3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
8. Shell Programming and Scripting
Hi,
I have an unwanted string at random lines of my verilog (*.v) file.
(* abccddee *) input A;
(* xyz *) input B;
(* 1234 *) output C;
I want a clean file like this:
input A;
input B;
output C;
the unwanted string begins with "(*" and ends with "*)" at multiple lines.
Any help... (2 Replies)
Discussion started by: return_user
2 Replies
9. Shell Programming and Scripting
Input File:
nawk -F "|" '{
for(i=1;i<=NF;i++) {
if (i == 2)
{gsub(",","#",$i);z=split($i,a,"")}
else if (i == 3)
{gsub(",","#",$i);z=split($i,b,"")}
}
if(z > 0) for(i=1;i<=z;i++)
print $1,a,"Test";
if(w > 0) for(j=1;j<=w;j++)
... (1 Reply)
Discussion started by: pinnacle
1 Replies
10. Shell Programming and Scripting
Hi folks,
- I have 800 txt files
- those files are cisco router configs
router1.txt
router2.txt
...
router800.txt
I want to accomplish the following:
- I want to have a seperate file with all the filenames that I want to process
- I want a script that goes trough all those... (7 Replies)
Discussion started by: I-1
7 Replies