Sponsored Content
Special Forums Windows & DOS: Issues & Discussions DOS Dir - listing of full path and timestamp Post 302452500 by Lakris on Friday 10th of September 2010 07:17:08 PM
Old 09-10-2010
No problems!
I often get frustrated about the shortcomings of "DOS". When I have a complicated script problem it often results in tweaks and workarounds and temporary files, fooling the shell with any number of %%% and """" (where nobody actually knows why it works, it just does, sometimes... also depending if it's in a bat/cmd-file or on an interactive command line) using dozens of programs, that so easily could have been solved with bash alone, possibly with a helper such as sort/grep/find/cut or whatever.

Good Luck!
/L

PS Have a look at the "FOR /R" construct. "http://ss64.com/nt/for_r.html" Can that help?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

from dos dir a: to similar to a dds tape?

is it possible to see what is in a dds tape? like in dos, we can write dir a: to see the contents of it? thanks PS : actually, i came from a DOS background. so most of the time, i will try to relate unix to dos. of course, dos never came close to unix. but unix is like many instances of dos... (3 Replies)
Discussion started by: yls177
3 Replies

2. Shell Programming and Scripting

how I change dir in dos

Hi I have a dos batch file in window server where I call a cmd command for creating some db. this cmd commad is located in e:\data\abcd\xyz.cmd. Now I call this batch file from unix ssh.sh but my access point is D in window server here I want to change the dos prompt to e:\data\abcd. in... (3 Replies)
Discussion started by: Jamil Qadir
3 Replies

3. Shell Programming and Scripting

full path of a file situated either in parent's dir. or parent's parent dir. so on...

hi experts(novice people can stay away as it is no child's game), i am developing a script which works like recycle bin of windows. the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to... (1 Reply)
Discussion started by: yahoo!
1 Replies

4. Shell Programming and Scripting

How do I define a particular dir in PATH variable and then unset that dir

How do I define a particular dir in front of PATH variable and then run some job and then at the end of job SET the PATH variable to original? in a script, WILL something like this work: ORIG_PATH=$PATH export PATH=/dir1/dir2:$PATH RUN SOME JOBS ..... unset PATH EXPORT... (2 Replies)
Discussion started by: Hangman2
2 Replies

5. Linux

dos-path / un-dos-path compatibility with cygwin

Hello ; I have a problem running some script on dos . when i run : C: ls /temp ls: cannot access /temp: No such file or directory but when i run C: ls \temp windriver backup remotebackup also when i run C: ls temp windriver backup remotebackup The... (4 Replies)
Discussion started by: mulder20
4 Replies

6. Windows & DOS: Issues & Discussions

DOS script to grab the first file in a dir and rename it

:confused: Hello, Is there any way to use the dir command / some DOS Script to select only first file of similar pattern of files in a direcotory and rename it for example, one directory has 5 files abc_1005.txt abc_5256.txt abc_2001.txt abc_2003.txt abc_3006.txt by use script I would... (2 Replies)
Discussion started by: raghav525
2 Replies

7. UNIX for Dummies Questions & Answers

Listing files with full path

Hi, I need to store all the files in a directory to a text file with its full path. The example below can explain: ./File1.txt ./File2.txt ./Folder1/File11.txt ./Folder1/File12.txt ./Folder1/Folder11/File111.txt ./Folder2/file21.txt : : The ls -R1 command won't give the result as... (5 Replies)
Discussion started by: r_sethu
5 Replies

8. Shell Programming and Scripting

Retrieve directory path from full file path through sh

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

9. Shell Programming and Scripting

How to extract strings from full path when full path is not fixed

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

10. Shell Programming and Scripting

how to get the scripts full dir path

lyang0@lyang0-OptiPlex-755:~$ ./test.sh . lyang0@lyang0-OptiPlex-755:~$ cat test.sh #!/bin/bash echo `dirname $0` lyang0@lyang0-OptiPlex-755:~$ pwd /home/lyang0 it doesn't get "/home/lyang0" and only when run /home/lyang0/test.sh it will get, but how can I do, then it can get the real... (8 Replies)
Discussion started by: yanglei_fage
8 Replies
snmpm_conf(3erl)					     Erlang Module Definition						  snmpm_conf(3erl)

NAME
snmpm_conf - Utility functions for handling the manager config files. DESCRIPTION
The module snmpm_conf contains various utility functions to used for manipulating (write/append/read) the config files of the SNMP manager. EXPORTS
manager_entry(Tag, Val) -> manager_entry() Types Tag = address | port | engine_id | max_message_size Val = term() manager_entry() = term() Create an entry for the manager config file, manager.conf . The type of Val depends on the value of Tag , see Manager Information for more info. write_manager_config(Dir, Conf) -> ok write_manager_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [manager_entry()] Write the manager config to the manager config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Manager Information for more info. append_manager_config(Dir, Conf) -> ok Types Dir = string() Conf = [manager_entry()] Append the config to the current manager config file. Dir is the path to the directory where to store the config file. See Manager Information for more info. read_manager_config(Dir) -> Conf Types Dir = string() Conf = [manager_entry()] Read the current manager config file. Dir is the path to the directory where to store the config file. See Manager Information for more info. users_entry(UserId) -> users_entry() users_entry(UserId, UserMod) -> users_entry() users_entry(UserId, UserMod, UserData) -> users_entry() Types UserId = term() UserMod = atom() UserData = term() standard_entry() = term() Create an entry for the manager users config file, users.conf . users_entry(UserId) translates to the following call: users_entry(UserId, snmpm_user_default) . users_entry(UserId, UserMod) translates to the following call: users_entry(UserId, UserMod, undefined) . See Users for more info. write_users_config(Dir, Conf) -> ok write_users_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [users_entry()] Write the manager users config to the manager users config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Users for more info. append_users_config(Dir, Conf) -> ok Types Dir = string() Conf = [users_entry()] Append the users config to the current manager users config file. Dir is the path to the directory where to store the config file. See Users for more info. read_users_config(Dir) -> Conf Types Dir = string() Conf = [users_entry()] Read the current manager users config file. Dir is the path to the directory where to store the config file. See Users for more info. agents_entry(UserId, TargetName, Comm, Ip, Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -> agents_entry() Types UserId = term() TargetName = string() Comm = string() Ip = string() Port = integer() EngineID = string() Timeout = integer() MaxMessageSize = integer() Version = v1 | v2 | v3 SecModel = v1 | v2c | usm SecName = string() SecLevel = noAuthNoPriv | authNoPriv | authPriv agents_entry() = term() Create an entry for the manager agents config file, agents.conf . See Agents for more info. write_agents_config(Dir, Conf) -> ok write_agents_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [_entry()] Write the manager agents config to the manager agents config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Agents for more info. append_agents_config(Dir, Conf) -> ok Types Dir = string() Conf = [agents_entry()] Append the agents config to the current manager agents config file. Dir is the path to the directory where to store the config file. See Agents for more info. read_agents_config(Dir) -> Conf Types Dir = string() Conf = [agents_entry()] Read the current manager agents config file. Dir is the path to the directory where to store the config file. See Agents for more info. usm_entry(EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry() usm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry() Types EngineID = string() UserName = string() SecName = string() AuthP = usmNoAuthProtocol | usmHMACMD5AuthProtocol | usmHMACSHAAuthProtocol AuthKey = [integer()] PrivP = usmNoPrivProtocol | usmDESPrivProtocol | usmAesCfb128Protocol PrivKey = [integer()] usm_entry() = term() Create an entry for the agent community config file, community.conf . See Security data for USM for more info. write_usm_config(Dir, Conf) -> ok write_usm_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [usm_entry()] Write the manager usm config to the manager usm config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Security data for USM for more info. append_usm_config(Dir, Conf) -> ok Types Dir = string() Conf = [usm_entry()] Append the usm config to the current manager usm config file. Dir is the path to the directory where to store the config file. See Security data for USM for more info. read_usm_config(Dir) -> Conf Types Dir = string() Conf = [usm_entry()] Read the current manager usm config file. Dir is the path to the directory where to store the config file. See Security data for USM for more info. Ericsson AB snmp 4.19 snmpm_conf(3erl)
All times are GMT -4. The time now is 10:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy