06-30-2007
how to retrieve sub directorires under a specified directory
Hello,
i need to retrieve ALL subdirectories under a specified directroy in my C++ program. Could anyone please tell me how to do this.
Thanks
Last edited by cy163; 06-30-2007 at 06:29 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
i have a cfg file,it contains
lpdma520.dev.ipc.us.aexp.com=SUBMCORE.REQUEST.FT
lpdma521.dev.ipc.us.aexp.com=SUBMCORE.REQUEST.FTREQ
lpdma522.dev.ipc.us.aexp.com=SUBMITSECUREFILEFLOW
i am retrieving the values using the function
RetrieveCfgvalue()
{
CFG_VALUE=`grep "$2="... (1 Reply)
Discussion started by: satish@123
1 Replies
2. Shell Programming and Scripting
when I do a df -k for a particular mount i get the result like this
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ 4128448 3527496 391240 91% /
I need to extract the value 91 from this and use it in my script in an if condition. How will i do it Please advice. (8 Replies)
Discussion started by: codeman007
8 Replies
3. UNIX for Advanced & Expert Users
How will retrieve for a particular months file in UNIX say for example from January to February 2008. (1 Reply)
Discussion started by: rajesh08
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
We run an IMAP server at work. I had to move the home directory of one user to another partition. I updated his account in /etc/passwd. For some reason his Microsoft Outlook account cannot rertrieve his new emails. I check /var/spool/mail and his emails are there...
Any advice? (1 Reply)
Discussion started by: mojoman
1 Replies
5. Shell Programming and Scripting
hello,
I have a file that have lines that contains xml tags. for each line, i want to retrieve the value from the following xml tags and output it to another file with the values only, comma seperated. what is the best way to do this? again, the string is all in 1 line one, though it has many... (9 Replies)
Discussion started by: davidsouk
9 Replies
6. Shell Programming and Scripting
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies
7. Shell Programming and Scripting
Hi,
i am writing a shell script that will execute a select query. the select query returns one specific value.
Idql is used for quering in documentum...
X = $ (idql <docbase> -U<username> -<pwd> -Rdqlqueryfile.dql << !
set heading off
set footer off
!)
query in dqlqueryfile is... (0 Replies)
Discussion started by: kichu
0 Replies
8. Shell Programming and Scripting
Hi,
I have a file say file1.ksh. Which has data like:
ifile $AI_SERIAL/$FILE.DAT...
ofile $AI_SERIAL/feed.dat...
My requirement is to find the count of all the lines which does not have $ after /. So i have written the code:
grep -w 'AI_SERIAL' file1.ksh | cut -d '/' -f2 | grep... (9 Replies)
Discussion started by: Kamna
9 Replies
9. Shell Programming and Scripting
hi,
i have some file in a directory say
p1.txt.201305051200.lst
p1.txt.201305051300.lst
p1.txt.201306051200.lst
p1.txt.201306051300.lst
p2.txt.201306051200.lst
p2.txt.201306051300.lst
i am using p* pattern to retrieve these file
ls -1 p*
the files in red color are the latest... (7 Replies)
Discussion started by: Little
7 Replies
10. Shell Programming and Scripting
I have this in log file /var/log/maillog
XXX YYY ZZZ :15214 I=:25 AAA BBB CCC
I need awk/sed operation on this, so that it retrieves only the first IP.
cat /var/log/maillog | sed_operation
55.66.77.88 (2 Replies)
Discussion started by: anil510
2 Replies
LEARN ABOUT MOJAVE
gettxt
gettxt(1) User Commands gettxt(1)
NAME
gettxt - retrieve a text string from a message database
SYNOPSIS
gettxt msgfile : msgnum [dflt_msg]
DESCRIPTION
gettxt retrieves a text string from a message file in the directory /usr/lib/locale/locale/LC_MESSAGES . The directory name locale corre-
sponds to the language in which the text strings are written; see setlocale(3C).
msgfile Name of the file in the directory /usr/lib/locale/locale/LC_MESSAGES to retrieve msgnum from. The name of msgfile can be
up to 14 characters in length, but may not contain either (null) or the ASCII code for / (slash) or : (colon).
msgnum Sequence number of the string to retrieve from msgfile. The strings in msgfile are numbered sequentially from 1 to n, where
n is the number of strings in the file.
dflt_msg Default string to be displayed if gettxt fails to retrieve msgnum from msgfile. Nongraphic characters must be represented
as alphabetic escape sequences.
The text string to be retrieved is in the file msgfile, created by the mkmsgs(1) utility and installed under the directory
/usr/lib/locale/locale/LC_MESSAGES . You control which directory is searched by setting the environment variable LC_MESSAGES. If LC_MES-
SAGES is not set, the environment variable LANG will be used. If LANG is not set, the files containing the strings are under the directory
/usr/lib/locale/C/LC_MESSAGES .
If gettxt fails to retrieve a message in the requested language, it will try to retrieve the same message from /usr/lib/locale/C/LC_MES-
SAGES/ msgfile. If this also fails, and if dflt_msg is present and non-null, then it will display the value of dflt_msg; if dflt_msg is not
present or is null, then it will display the string Message not found!!.
EXAMPLES
Example 1: The environment variables LANG and LC_MESSAGES.
If the environment variables LANG or LC_MESSAGES have not been set to other than their default values, the following example:
example% gettxt UX:10 "hello world
"
will try to retrieve the 10th message from /usr/lib/locale/C/UX/msgfile. If the retrieval fails, the message "hello world," followed by a
newline, will be displayed.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of gettxt: LC_CTYPE and LC_MESSAGES.
LC_CTYPE Determines how gettxt handles characters. When LC_CTYPE is set to a valid value, gettxt can display and handle text
and filenames containing valid characters for that locale. gettxt can display and handle Extended Unix Code (EUC)
characters where any individual character can be 1, 2, or 3 bytes wide. gettxt can also handle EUC characters of 1,
2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
LC_MESSAGES Determines how diagnostic and informative messages are presented. This includes the language and style of the mes-
sages, and the correct form of affirmative and negative responses. In the "C" locale, the messages are presented
in the default form found in the program itself (in most cases, U.S. English).
FILES
/usr/lib/locale/C/LC_MESSAGES/*
default message files created by mkmsgs(1)
/usr/lib/locale/locale/LC_MESSAGES/*
message files for different languages created by mkmsgs(1)
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWloc |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO
exstr(1), mkmsgs(1), srchtxt(1), gettxt(3C), setlocale(3C), attributes(5), environ(5)
SunOS 5.10 20 Dec 1996 gettxt(1)