Tag Archives: Attached Files

Help on digestion of C header files for a short program.

By yifangt

File Type: gz
I found a very short but very efficient program to handle big sequence file (>30GB), but could not understand it.
https://github.com/lh3/seqtk
Wrote to the author but no reply, probably because the program needs comprehensive knowledge of C.
Can any C expert “walk me thru” the two header files (attached) before I go to the program (not attached). I know it is quite tedious to explain line by line, but I felt desperate with C. Hesitated for some time, can’t hold asking for help here. Thanks a lot in advance!

Attached Files
khash.h.gz (4.7 KB)
File Type: gz kseq.h.gz (2.7 KB)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Looping through entire directory and count unique values

By ritakadm

File Type: txt
Hello,

I`m a complete newbie to coding, please help with this problem.

I have multiple files in a directory, I have to loop through the contents of each file and extract number of unique isoforms in that file. Each file is tab delimited and only the line with the first parent (column 3) needs to be read.

Sample file

Code:

1 Graph graph 260052556 260054526 . + . ID=HCG177897.2_FG022
1 Graph parent 260052556 260052696 . + . ID=HCG177897.2_FG022_1;Isoforms=HCG177897.2_FGT022,HCG177897.2_FGT023
1 Graph child 260052742 260054066 . + . ID=HCG177897.2_FG022_2;Parent=HCG177897.2_FG022_1;Isoforms=HCG177897.2_FGT022
1 Graph child 260054161 260054239 . + . ID=HCG177897.2_FG022_3;Parent=HCG177897.2_FG022_2;Isoforms=HCG177897.2_FGT022
1 Graph child 260054323 260054526 . + . ID=HCG177897.2_FG022_4;Parent=HCG177897.2_FG022_3;Isoforms=HCG177897.2_FGT022
1 Graph child 260054323 260054526 . + . ID=HCG177897.2_FG022_4;Parent=HCG177897.2_FG022_3;Isoforms=HCG177897.2_FGT022
1 Graph child 260054323 260054526 . + . ID=HCG177897.2_FG022_4;Parent=HCG177897.2_FG022_3;Isoforms=HCG177897.2_FGT023
1 Graph child 260054323 260054526 . + . ID=HCG177897.2_FG022_4;Parent=HCG177897.2_FG022_3;Isoforms=HCG177897.2_FGT023
1 Graph child 260054323 260054526 . + . ID=HCG177897.2_FG022_4;Parent=HCG177897.2_FG022_3;Isoforms=HCG177897.2_FGT022
1 Graph child 260054323 260054526 . + . ID=HCG177897.2_FG022_4;Parent=HCG177897.2_FG022_3;Isoforms=HCG177897.2_FGT022


In the above sample the only revelant line is with the word ‘parent’ in column 3.

Code:

1 Graph parent 260052556 260052696 . + . ID=HCG177897.2_FG022_1;Isoforms=HCG177897.2_FGT022,HCG177897.2_FGT023


Column 9 is a composite column, where subfields are separated by ‘;’ but the last subfield doesnt end with ‘;’ as in the above line.

The subfield Isoforms=HCG177897.2_FGT022,HCG177897.2_FGT023 needs to be extracted and the number of isoforms need to be counted.
In this case there are 2 isoforms, which can be also calculated by number of (commas+1). Here there are 2 isoforms, separated by a comma.

I should note that sometimes there may be irrelevant fields after Isoforms,

example

Code:

1 Graph parent 260052556 260052696 . + . ID=HCG177897.2_FG022_1;Isoforms=HCG177897.2_FGT022,HCG177897.2_FGT023
;code=TRUE;FGTLL


but the calculations remain the same.

So I want to count the number of isoforms in each file in the directory
and write output in the form

HCG177897.2_FG022.txt 2

where HCG177897.2_FG022.txt is the filename

Desired output for sample inputs (attached)

Code:


HCG177897.2_FG002.txt 1
HCG177897.2_FG022.txt 2
HCG186375.3_FG001.txt 4


Attached Files
HCG177897.2_FG002.txt (743 Bytes)
File Type: txt HCG177897.2_FG022.txt (1.1 KB)
File Type: txt HCG186375.3_FG001.txt (829 Bytes)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Plot python script output to file

By newbie83

File Type: txt
Hi all,

I`m trying to generate some plots using a python package named splicegrapher.
I have access to a cluster which does not allow X11 forwarding and as a result I get RuntimeError: could not open display error when I use one of the plotting scripts (attached).

How do I modify the script so that it plots the output to a file instead of trying to display it?

I`m not sure if this is the right forum to ask this question, please help.

Attached Files
view_splicegraphs.txt (11.7 KB)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Core dump while doing Solaris packaging

By kamal_456

File Type: zip
Hi All,

I am doing Solaris packaging. I got core dump error while doing it. I have identified particular folder causing it but not sure about the reason. Without
that folder i can able to do the package. I have attached the proto file and other related files for your reference. Pls advice. Thanks !

Regards
Kamal

Attached Files
pkgfile.zip (2.89 MB)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

How to use sed to search a particular pattern in a file backward after a pattern is matched.?

By saurabh kumar

File Type: txt
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.

In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to search backward for the path and print the corresponding path (/home/saurabh/file1.txt). Please note that there may be many entries between the path(/home/saurabh/file1.txt) and the line containing the pattern 1172c1172.

Any suggestions will be highly appreciated.

Thanks,
Saurabh

Attached Files
file1.txt (289 Bytes)
File Type: txt file2.txt (105 Bytes)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

vnc viewer presents black screen along with GNOME settings daemon errors.

By Miguel E. Perez

File Type: txt
Hello folks,

I’m remotely connecting through VNC to two machines, each running Red Hat 5.9, from mine which is running Windows 7. Both connections were working well before. However, now one of the machines only gives me a black screen, with a pop up that says:

“There was an error starting GNOME Settings Daemon. Some things, such as themes, sounds, or background settings may not work correctly. The last error message was: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.”

I’ve searched all over the net for a solution to no avail. One thing I tried was deleting the following files in hopes of resetting my gnome environment but this did not help either.

Files: /tmp/orbit-, .gconf, .gconfd, .gnome, .gnome2 and .metacity.

I have attached the two vncviewer log files, one from the connection that still works well and the other from the one that gives me the above errors, named bad and good respectively.

I’m new to the forum so I apologize if this is not the most adequate forum section for my problem or if I omitted any relevant files or debug information. I would greatly appreciate any help you can send my way.

Miguel.

Attached Files
good.txt (2.4 KB)
File Type: txt bad.txt (6.8 KB)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Scripting users issues…

By wingzero89

File Type: pl
Hello everyone, I am new to the forum community and need help with some scripts. I have attached what I have so far and these are scripts that have been passed on to me for a project that I have been assigned. To tell the truth I have never really worked with scripts and have no clue how these even work (so any information or help that is dumbed down would be beneficial). The person that passed this on to me is no longer is available to be reached and they did not provide any documentation on this information. I know the scripts are supposed to create new users to be used with mysql and phpmyadmin on the server. My questions are how do these even work and what do they do? Also if anyone has suggestions on how to make these more effective and secure feel free to try and help out or point me in the right direction. Another thing that I was wondering with these is how would I go about making changes to allow tracking of the accounts created and to create a script to remove all files associated with a specific user and have it stored in an archive. Thanks everyone and I appreciate you help.

Attached Files
create-accts.pl (2.0 KB)
File Type: sh create-accts.sh (127 Bytes)
File Type: sh new.sh (533 Bytes)
File Type: pl script.pl (9.1 KB)
File Type: pl undoscript.pl (438 Bytes)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Shell Code required -Output in Multiple Rows to be in single row separated by Commas –

By manishK

File Type: txt
Hola Greetings Experts ,

I have records spreaded across multiple lines. in attached log.txt i want output to be in 1 line like this below Atached as Output.txt.

In brief
Output related to 1 line is spreaded across multiple row I wanted it to be in 1 row .

Please opem the file in notepad as I have modified as per output Is required

EXPERTS PLEASE HELP !!!!

Attached Files
Log.txt (12.8 KB)
File Type: txt output.txt (1.5 KB)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Print each paragraph in a text file into excel file

By prash358

File Type: xls
Hi,

I have a below text file, which needs to be printed into attached excel file. Please help me.


dn: cn=BR-PF-FTLRIG34,ou=role,O=test,C=com
user_ok: CN=Bruno Garcone,ou=employee,O=test,C=com

dn: cn=Mustafa B. Biterge,ou=employee,O=test,C=com
user_ok: cn=Jalal Khazanedari,ou=employee,O=test,C=com
user_ok: cn=Omer M. Gurpinar,ou=employee,O=test,C=com
user_ok: cn=Pedro Rene Romero Navarre,ou=employee,O=test,C=com

dn: cn=SMS-Las-Morochas,ou=list,O=test,C=com
user_bad: cn=Belkis Machado,ou=employee,O=test,C=com


Thanks

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Compare 2 file and write result

By Akshay Hegde

File Type: txt
Hi friends…I have 2 files, file1.txt and reference.txt

I could able to find difference using

Code:

diff


and following command

Code:

awk 'NR == FNR { A[$0]=1; next } !A[$0]' reference.txt file1.txt


above command listing data which is not in reference.txt

Code:

12.12 87
11.95 88
11.83 89
12.55 84
12.42 85
12.27 86
11.82 89
12.55 84.03
12.38 85.15
12.1 87.03
11.97 88
12.25 86.03
12.07 87.42
11.9 88.35
11.8 89.07


here my intension is to list all data from file1.txt and print text “not available” to data which is not available in reference.txt

Code:

output looks like this
9 72.92 available
9.75 72.77 available
10.57 72.75 available
10.53 73 available
10.43 73.5 available
10.33 74 available
9.97 76 available
11.95 88 not available
11.83 89 not available
12.55 84 not available
12.42 85 not available
12.27 86 not available
11.82 89 not available


…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

How to make the cut command read a column after logical statements are meet?

By pericopericone

Hi,

I want to write a code that will cut everything that is under a couple of columns in a text file but so far I am not even close to achieve something like that.

Basically, I want to cut all the information from the columns and transfer the column information to a spread sheet.

I have the solution in my mind, but in computer logic it is harder.

The solution is:

If (delimiter = ITEM) then cut 1-6
if (delimiter = DESCRIPTION) then cut 8-37
if (delimiter = PRICE) then cut 39-47

and so on…

If you think there is an easier way to transfer the information in the columns to a spread sheet please let me know.

Thank you!

Source: FULL ARTICLE at The UNIX and Linux Forums

How to compare two files ?

By Akshay Hegde

Hi am just trying to compare two files data…

datafile1 is standard data, datafile 2 is varying

Code:

st_data.txt

Code:


long lat
68.14 23.48
67.56 22.99
67.08 22.49
66.79 22.25
66.68 22.18
66.07 21.89
65.67 21.65
65.6 21.56



Code:

un_std.txt
long lat
75.5 10.05
75.02 10.15
74.52 10.23
74.02 10.33
73.45 10.43
73.15 10.48
2.1 10.55
74.15 8.9
72.73 10.53
72.98 10.43
73.52 10.23


here I want to compare like this

Code:

if un_std data file's long and lat is less than or equal to std_data file's long and lat write "YES"(within region) to particular row else "NO"(outside region) corresponding row,

here I want to cross check a single entry of un_std file with all entry's of std_file if condition meets, then to write yes or no


Source: FULL ARTICLE at The UNIX and Linux Forums

How to concatenate list of ID's?

By buzzme

Hi
I have attached list of id’s and i need like below using shell script.

Input:
uid=c232346uid=c232408uid=c232438uid=c232584uid=c232587uid=c232635uid=c232637uid=c232732uid=c233003u id=c245377uid=c277345

output needed:

(uid=c232346)(uid=c232408)(uid=c232438)(uid=c232584)(uid=c232587)(uid=c232635)(uid=c232637)(uid=c232 732)(uid=c233003)(uid=c245377)(uid=c277345)

Source: FULL ARTICLE at The UNIX and Linux Forums

Error occurred while making the net-snmp 5.4.4 on Solaris 5.10 version.

By ziosnim

Hi all,

Error occurred while making the net-snmp-5.4.4 on Solaris 5.10 version.

Environment
– Solaris 5.10-x86
– Net-SNMP-5.4.4.tar.gz
– Path (/etc/profile)
——————————————————————–

PATH=/usr/local/bin:$PATH
export PATH
LD_LIBRARY_PATHUSR=/usr/ccs/bin:
export LD_LIBRARY_PATH

——————————————————————–

Error01 – summary
——————————————————————–
*** Error code 1
make: Fatal error: Command failed for target `libnetsnmp.la’
Current working directory /opt/download/net-snmp/snmplib
*** Error code 1
The following command caused the error:
if test “snmplib agent apps man local mibs” != “”; then
it=”snmplib agent apps man local mibs” ;
for i in $it ; do
echo “making all in `pwd`/$i”;
( cd $i ; /usr/ccs/bin/make ) ;
if test $? != 0 ; then
exit 1 ;
fi
done
fi
make: Fatal error: Command failed for target `subdirs’
#
——————————————————————–

Error02 – summary
——————————————————————–
make[1]: *** [libnetsnmp.la] error 1
make[1]: Leaving directory `/opt/download/net-snmp/snmplib’
make: *** [subdirs] error 1
#
——————————————————————–

Please refer to the attached error files.

Thank you in advance.

Attached Files
File Type: txt error01.txt (28.1 KB)
File Type: txt error02.txt (28.0 KB)

Source: FULL ARTICLE at The UNIX and Linux Forums

How to decode text files?

By Akshay Hegde

HI experts….I am trying to decode some text files… I need little help from you people…file is of mixed type…from generated from windows based system

my text files looks like this…

Code:

2.AUBZ 158 1 11 116204310 6 N 7542 E 18
02846 52833 102821 152815 202824 252812 302804 352825 402809
452774 502759 552727 602712 652699 702685 752655 802603 852539
2.AUCE 50 39 12 12314 453 0 S 5730 E 130
0 374 5 374 10 375 15 375 20 375 25 374 30 373 35 373 40 371
45 376 50 376 55 366 60 370 65 366 70 362 75 359 80 358 85 358
90 354 95 354 100 319 105 262 110 243 115 233 120 226 125 220 130 217
135 209 140 200 145 198 150 199 155 196 160 197 165 198 170 201 175 205
180 207 185 211 190 215 195 217 200 218 205 217 210 218 215 217 220 218
225 230 230 225 235 232 240 227 245 224 250 226 255 229 260 228 265 230
270 234 275 237 280 239 285 237 290 241 295 242 300 240 305 239 310 239
315 239 320 238 325 239 330 239 335 241 340 241 345 241 350 239 355 239


I want to print like this

Code:

2 AUBZ 158 1 11 1162043 10 6N 7542E 18 0 28.46
2 AUBZ 158 1 11 1162043 10 6N 7542E 18 5 28.33
2 AUCE 50 39 12 12314 4 53 0S 5730E 130 0 37.4
2 AUCE 50 39 12 12314 4 53 0S 5730E 130 5 37.4
2 AUCE 50 39 12 12314 4 53 0S 5730E 130 355 23.9


Source: FULL ARTICLE at The UNIX and Linux Forums

How to read particular line in file from specific column?

By nex_asp

Hi…friends….

I want to create inventory…information for that I need to read some specific row say 2nd row from 1st 3 column and and write data with particular file used, I have some more column also but I need only 3 column data of first entry after header

I attached sample file..those who know please help…
my input

Code:

ST_DATE LATITUDE LONGITUDE
05 Aug 1988 07:10:00 AM 9.983 68.033
05 Aug 1988 07:10:00 AM 9.983 68.033
05 Aug 1988 07:10:00 AM 9.983 68.033


need of output is like this

Code:

filename date time lat long
myfile.txt 05/08/98 07:10:00 9.983 68.033


Attached Files
File Type: txt myfile.txt (139 Bytes)
File Type: txt output.txt (71 Bytes)

Source: FULL ARTICLE at The UNIX and Linux Forums

XML id replacement with shell

By nex_asp

Hi..

I have a problem with replacing of

Code:

id-0f5435080b


with some name daily, problem here is whenever I generate xml file it generates unique id for instance say for example today

Code:

id-0f5435080b


and tomorrow it may be

Code:

id-0f686435080c


so basically I just want to replace this id with some name say my_datafile in file, till date I am doing with find and replace in gedit manually, if any automation is possible to replace this unique id please help.

Code:

requirement of result is as follows

Code:




I have attached one of my xml files here.

Source: FULL ARTICLE at The UNIX and Linux Forums

Trouble with Kerberos/LDAP and AIX 6.1

By jgeiger

The KRB5ALDAP compound load module is giving me fits. Everything looks like it should be working, but no.

Goal: Integrate AIX host with Active Directory using a KRB5ALDAP compound load module so that users can be created in AD and used in AIX, with unix attributes (registry values) being pulled from AD. Eliminate the need to manage user accounts on a per-server basis.

Issue: User attributes are visible with lsuser and returned with ldapsearch. Kerberos authentication shows successful at the domain controller, but a “permission denied” or “invalid login or password” message is displayed. Files can be chown-ed to the user accounts, but SU fails.

I attached a doc with the pertinent configs and troubleshooting steps. Since making that doc, I have also chased the enctype (switched to solely RC4) and the KVNO (tried 2, 3, 4). But no love.

Any help would be greatly appreciated.

Source: FULL ARTICLE at The UNIX and Linux Forums

Unable to update fedora after upgrading from fedora17 to fedora18

By vaibhavvsk

I have just upgraded to fedora 18 from 17 using fedup tool. The upgradation process succeeded and I can feel the new desktop appearance of fedora18.

when I tried to update using yum update. I can see that the fedora17 files are not removed completely and they are also listed below the files to be updated list.

I have attached the standard output of the terminal update window with the thread.

could anyone help me out to fix it ? :wall:

Source: FULL ARTICLE at The UNIX and Linux Forums