Actually we should count the sequences of non-slashes to find the least deepest path, so that we do not count leading, ending and double slashes ( leaving paths with ../ out of the equation )
That solution doesn't handle consecutive slashes properly. Specifically, m=NF renders the comparison of gsub's return value meaningless.
Feeding the following pathological data should demonstrate the problem:
I'll leave the correction as an exercise for someone else, but I believe that using this approach requires storing the return value of gsub for subsequent comparison.
Hi All,
I need to select only those records having a non zero record in the first column of a comma delimited file.
Suppose my input file is having data like:
"0","01/08/2005 07:11:15",1,1,"Created",,"01/08/2005"
"0","01/08/2005 07:12:40",1,1,"Created",,"01/08/2005"... (2 Replies)
Hi,
I am new to this world of shell programming. I am facing a problem that is :
I have directory which has many sub directories at different depth. say
A/B/C/files
A/B/files
A/B/C/D/files
In this directory structure there exists a file called ".project" in some of the sub... (2 Replies)
Hi all,
I am learning the use of regular expression and I would like to know which regex can be used to select only the last part of a directory path name.
Something like:
/dir1/dir2/dir2
and I want to select the last /dir2 where dir2 can be any kind of string.
Thanks a lot for your help.... (7 Replies)
Hello,
I have a question. I have to implement a shortest path algorithm in n*n grid, moving from one coordinate to another coordinate.
But i have no clue how to start. Can anyone help?
Thanks a tonn in advance! (1 Reply)
I m trying to grep 'select * from' from a script, but the problem is with the * ...
I think its taking * as some special character ...
when I try to do grep '*' test (test is my test file) its displaying *
But when I am trying to do grep 'select * from' test its not showing anything... (2 Replies)
Can somebody help me on below question
I have path and i want to select first two directory name in variable how we can do this.
/Myname/xyz/yourname/abc/somebodyname
i want to select /Myname/xyz in variable.
Quick help will be appriciated.
Thanks in advance
Regards,
Kumar (10 Replies)
Hai,
I want to select only line numbers into a file if some pattern matches. I have written my script like below but its not working.
#!/bin/sh
file='/home/testfile1'
filesearch='/home/test00'
while read line
do
search=`echo $line |cut -c 1-24`
echo $search
echo `grep -n ""... (3 Replies)
Hi all, I have this file __DATA__
child, Parent, probability,
M7, Q, P,
M7, M28, E,
M28, M6, E,
M6, Q, Pl,
& several hundred lines..... Legends: P(= Probable) > Pl(=Plausible) > E(=Equivocal). What I want is for each child I want to trace it... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have to write a program that have to read every standard input then print out the line number and the content of... (10 Replies)
Discussion started by: scopiop
10 Replies
LEARN ABOUT DEBIAN
srf_list
srf_list(1) Staden io_lib srf_list(1)NAME
srf_list - Lists and/or counts the contents of an SRF file
SYNOPSIS
srf_list [options] srf_archive ...
DESCRIPTION
srf_list lists the filenames held within one or more SRF container. To simply count the contents rather than list them specify the -c
option. Note that when in count-only mode if an index is present it will be used to determine the number of entries in the index and hence
sequences in the SRF file. The index cannot be used when listing the filenames however as the index itself does not contain the full file-
names.
Note that it is not possible to count sequences matching certain patterns or with specific flags set. srf_info is a more general purpose
tool that may cover this.
OPTIONS -c Counts sequences instead of listing them. Note that this may be substantially faster than listing if an index exists.
-v Verbose mode. This gives summary count information per file rather than just the total at the end.
-l Long format. When listing sequence names this also provides information on the position in the archive and the size of the sequence
specific data block and the size of the shared data block header.
EXAMPLES
To count the total number of sequences in several SRF files:
srf_list -c *.srf
To produce a "fofn" (file of filenames) for an SRF file:
srf_list foo.srf > foo.fofn
AUTHOR
James Bonfield, Wellcome Trust Sanger Institute
September 29 srf_list(1)