Please wrap all code, files, input & output/errors in CODE tags for clarity.
It uses mono-space text and preserves white-space for indenting or fixed-width data.
Good morning - I have publication lists from 34 different faculty members. I need to end up with the numbers of publications in common across all 34 faculty.
I need to grep person1 (last name) in list2, person1 in list3, person1 in list 4, etc., then person2 in list3, person 2 in list4, etc.,... (2 Replies)
I have to to read files simultaneously in two nested loops,but am getting error can anyone do the needful.
useridFile=userIds.txt
fname=kiran.txt
exec<$useridFile
while read line
do
echo "User IDs are..$line"
USER_ID=$line
REMOTE_DIR_LOCATION="/home/test/$USER_ID"
SOURCE_DIR=$USER_ID... (1 Reply)
I need help getting over this bump on how nested for loops work in shell. Say i was comparing files in a directory in any other language my for loop would look like so
for(int i=0;to then end; i++)
for(int y = i+1; to the end; y++)
I can't seem to understand how i can translate that... (5 Replies)
Ok... am going slightly loopy trying to get this working (no pun intended)
What I need is to modify this code which takes a string input then echo's each character on a seperate line, to do the same thing but to put DIGIT: in front of numbers and LETTER: in front of letters.
I know a regular... (5 Replies)
KSH isn't my strong suit but it's what my company has to offer. I've got a script with two nested loops, a FOR and UNTIL, and that works fine. When I add a CASE into the mix I end up getting "Unexpected 'done' at line xx" errors. Any suggestions on this?
for divi in at ce ci cm co de di fl... (9 Replies)
Greetings All,
The following script attempts to enumerate all users in all groups in the group file(GROUP) and echo the following information:
GROUP ---> USER
The script is as follows:
IFS=","
for GROUP in `ypcat -k group | cut -d" " -f1`
do
for USER in `ypcat -k group... (13 Replies)
It's been a while since I used csh formatting and I am having a little bit of trouble with a few things. Things seem so much easier to execute in Matlab, however I need to do this on the terminal because of the programs I am trying to interact with.
So here's what I want to do: I have a file... (0 Replies)
I am trying to use two nested for loops to process some files and then create a new file using both variables in the output file name. I have several files in this naming style:
S1_L3_all_R1.fastq
S1_L3_all_R2.fastq
S1_L4_all_R1.fastq
S1_L4_all_R2.fastq
.
.
S1_L8_all_R1.fastq... (3 Replies)
for server in $(echo `cat /tmp/ScanHosts_${USERSNAME}.TXT`)
do
for portnumber in $(echo `cat /tmp/ScanPorts_${USERSNAME}.TXT`)
do
#echo ${server} ${portnumber}
... (3 Replies)
Discussion started by: SkySmart
3 Replies
LEARN ABOUT DEBIAN
zipios_filepath
zipios::FilePath(3) Library Functions Manual zipios::FilePath(3)NAME
zipios::FilePath -
FilePath represents a path to a file or directory name.
SYNOPSIS
#include <filepath.h>
Public Member Functions
FilePath (const string &path='', bool check_exists=false)
Constructor.
FilePath & operator= (const string &rhs)
operator string () const
FilePath operator+ (const FilePath &name) const
Concatenates FilePath objects.
FilePath filename () const
Returns filename of the FilePath object by pruning the path off.
bool exists () const
bool isRegular () const
bool isDirectory () const
bool isCharSpecial () const
bool isBlockSpecial () const
bool isSocket () const
bool isFifo () const
Protected Member Functions
void pruneTrailingSeparator ()
Prunes the trailing separator of a specified path.
void check () const
This function sets _checked to true, stats the path, to see if it exists and to determine what type of file it is.
Protected Attributes
bool _checked
bool _exists
bool _is_reg
bool _is_dir
bool _is_char
bool _is_block
bool _is_socket
bool _is_fifo
string _path
Static Protected Attributes
static const char _separator = '/'
Detailed Description
FilePath represents a path to a file or directory name.
FilePath has member functions to check if the file path is a valid file system entity, and to check what kind of file system entity it is,
e.g. is it a file, a directory, a pipe etc.
Definition at line 18 of file filepath.h.
Constructor & Destructor Documentation
zipios::FilePath::FilePath (const string &path = '', boolcheck_exists = false)
Constructor. Parameters:
path A string representation of the path.
check_exists If true is specified the constructor will check the existence and type of the path immidiately, instead of deferring that
task until it is needed.
Definition at line 18 of file filepath.cpp.
Member Function Documentation
void zipios::FilePath::check () const [protected]
This function sets _checked to true, stats the path, to see if it exists and to determine what type of file it is. All the query functions
check if _checked is true, and if it isn't they call check(). This means stat'ing is deferred until it becomes necessary.
Definition at line 27 of file filepath.cpp.
bool zipios::FilePath::exists () const [inline] Returns:
true If the path is a valid file system entity.
Definition at line 129 of file filepath.h.
FilePath zipios::FilePath::filename () const [inline]
Returns filename of the FilePath object by pruning the path off.
Definition at line 119 of file filepath.h.
bool zipios::FilePath::isBlockSpecial () const [inline] Returns:
true if the path is block special (a block device file).
Definition at line 157 of file filepath.h.
bool zipios::FilePath::isCharSpecial () const [inline] Returns:
true if the path is character special (a character device file).
Definition at line 150 of file filepath.h.
bool zipios::FilePath::isDirectory () const [inline] Returns:
true if the path is a directory.
Definition at line 143 of file filepath.h.
bool zipios::FilePath::isFifo () const [inline] Returns:
true if the path is a Fifo (a pipe).
Definition at line 171 of file filepath.h.
bool zipios::FilePath::isRegular () const [inline] Returns:
true if the path is a regular file.
Definition at line 136 of file filepath.h.
bool zipios::FilePath::isSocket () const [inline] Returns:
true if the path is a socket.
Definition at line 164 of file filepath.h.
FilePath zipios::FilePath::operator+ (const FilePath &name) const [inline]
Concatenates FilePath objects. A file separator is inserted if appropriate.
Definition at line 111 of file filepath.h.
void zipios::FilePath::pruneTrailingSeparator () [inline, protected]
Prunes the trailing separator of a specified path.
Definition at line 100 of file filepath.h.
Author
Generated automatically by Doxygen for Zipios++ from the source code.
Zipios++ Mon Oct 10 2011 zipios::FilePath(3)