Sponsored Content
Top Forums Shell Programming and Scripting global date for many scripts in shell Post 302212269 by fpmurphy on Monday 7th of July 2008 05:47:52 AM
Old 07-07-2008
Try exporting begin_date
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Determine date and time the file was created through shell scripts

Can I determine when the particular file was created, in korn-shell. Can please someone help me. If possible please mail the solution to me. my mail id: bharat.surana@gmail.com (1 Reply)
Discussion started by: BharatSurana
1 Replies

2. Shell Programming and Scripting

replace old date in scripts with new date

Hiee .... i want an immediate solution for this.... Let replace.cfg file contains a list of files to be replaced the old dates with new dates...... The script must take 3 parameters.... 1) old date 2) new date 3) .config file Can u get me the solution...... I tried with sed but i... (2 Replies)
Discussion started by: prasanna1983
2 Replies

3. Solaris

How to access ENV variables of non global zones in global zone???

Hi Guys, My requirement is I have file called /opt/orahome/.profile in non global zone. PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:. export PATH PS1="\${ORACLE_SID}:`hostname`:\$PWD$ " export PS1 EDITOR=vi export EDITOR ENV=/opt/orahome/.kshrc export ENV... (1 Reply)
Discussion started by: vijaysachin
1 Replies

4. UNIX for Dummies Questions & Answers

Shell Scripts - shows today’s date and time in a better format than ‘date’ (Uses positional paramete

Hello, I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Discussion started by: citizencro
3 Replies

5. UNIX for Dummies Questions & Answers

shell scripts - create a filename with the date appended

I am looking to do something where if I created a file named backup,or whatever it would print a name like “backup_Apr_11_2011”. Thanks citizencro (1 Reply)
Discussion started by: citizencro
1 Replies

6. UNIX for Dummies Questions & Answers

Shell Scripts - Append a filename with date and time....

Hello, I need to create a shell script that appends a filename to create a name with the date and time appended that is guaranteed to not exist. That is, the script insures you will not overwrite a file with the same name. I am lost with this one. I know I need to use date but after that I am... (3 Replies)
Discussion started by: citizencro
3 Replies

7. Shell Programming and Scripting

Global declaration of Array in Shell

Hi, Have assigned values in Array and iterating in while loop and would require values outside of the loop. But its returning NULL. could you please help us how to define Global array declaration in Unix shell scripting? i am using Kron shell. Thanks in advance. (2 Replies)
Discussion started by: periyasamycse
2 Replies

8. Shell Programming and Scripting

Date Arithimetic in shell scripts

Hi, I have a file which has a date extension to it. Like <filename>_01012014. I need to rename the file as 12152013 , that is i need to be able to subtract 15 days from the date of the file name. Please advise how this can be handled using shell scripting. Regards, VN (8 Replies)
Discussion started by: narayanv
8 Replies

9. Solaris

Global and non-global zone resource sharing - tricky

hi all, Just a simple question but i cant get the answers in the book - In my globalzone , assuming i have 4 cpus (psrinfo -pv = 0-3), if i set dedicated-cpu (ncpus=2) for my local zone Is my globalzone left with 2 cpus or still 4 cpus ? Does localzone "resource reservation.e.g. cpu in... (6 Replies)
Discussion started by: javanoob
6 Replies

10. Solaris

Date and time change in global and non global zone

Hi, If I change date and time in global zone, then it will affect in non global zones. During this process what files will get affect in non global zones and which mechanism it's using to change. gloabl zone:Solaris 11.3 X86 TIA (1 Reply)
Discussion started by: Sumanthsv
1 Replies
Exporting Topologies to XML.(3) 			     Hardware Locality (hwloc)				   Exporting Topologies to XML.(3)

NAME
Exporting Topologies to XML. - Functions int hwloc_topology_export_xml (hwloc_topology_t topology, const char *xmlpath) int hwloc_topology_export_xmlbuffer (hwloc_topology_t topology, char **xmlbuffer, int *buflen) void hwloc_free_xmlbuffer (hwloc_topology_t topology, char *xmlbuffer) void hwloc_topology_set_userdata_export_callback (hwloc_topology_t topology, void(*export_cb)(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj)) int hwloc_export_obj_userdata (void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length) int hwloc_export_obj_userdata_base64 (void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length) void hwloc_topology_set_userdata_import_callback (hwloc_topology_t topology, void(*import_cb)(hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length)) Detailed Description Function Documentation int hwloc_export_obj_userdata (void *reserved, hwloc_topology_ttopology, hwloc_obj_tobj, const char *name, const void *buffer, size_tlength) Export some object userdata to XML. This function may only be called from within the export() callback passed to hwloc_topology_set_userdata_export_callback(). It may be invoked one of multiple times to export some userdata to XML. The buffer content of length length is stored with optional name name. When importing this XML file, the import() callback (if set) will be called exactly as many times as hwloc_export_obj_userdata() was called during export(). It will receive the corresponding name, buffer and length arguments. reserved, topology and obj must be the first three parameters that were given to the export callback. Only printable characters may be exported to XML string attributes. If a non-printable character is passed in name or buffer, the function returns -1 with errno set to EINVAL. If exporting binary data, the application should first encode into printable characters only (or use hwloc_export_obj_userdata_base64()). It should also take care of portability issues if the export may be reimported on a different architecture. int hwloc_export_obj_userdata_base64 (void *reserved, hwloc_topology_ttopology, hwloc_obj_tobj, const char *name, const void *buffer, size_tlength) Encode and export some object userdata to XML. This function is similar to hwloc_export_obj_userdata() but it encodes the input buffer into printable characters before exporting. On import, decoding is automatically performed before the data is given to the import() callback if any. This function may only be called from within the export() callback passed to hwloc_topology_set_userdata_export_callback(). The function does not take care of portability issues if the export may be reimported on a different architecture. void hwloc_free_xmlbuffer (hwloc_topology_ttopology, char *xmlbuffer) Free a buffer allocated by hwloc_topology_export_xmlbuffer() int hwloc_topology_export_xml (hwloc_topology_ttopology, const char *xmlpath) Export the topology into an XML file. This file may be loaded later through hwloc_topology_set_xml(). Returns: -1 if a failure occured. Note: See also hwloc_topology_set_userdata_export_callback() for exporting application-specific userdata. Only printable characters may be exported to XML string attributes. Any other character, especially any non-ASCII character, will be silently dropped. int hwloc_topology_export_xmlbuffer (hwloc_topology_ttopology, char **xmlbuffer, int *buflen) Export the topology into a newly-allocated XML memory buffer. xmlbuffer is allocated by the callee and should be freed with hwloc_free_xmlbuffer() later in the caller. This memory buffer may be loaded later through hwloc_topology_set_xmlbuffer(). Returns: -1 if a failure occured. Note: See also hwloc_topology_set_userdata_export_callback() for exporting application-specific userdata. Only printable characters may be exported to XML string attributes. Any other character, especially any non-ASCII character, will be silently dropped. void hwloc_topology_set_userdata_export_callback (hwloc_topology_ttopology, void(*)(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj)export_cb) Set the application-specific callback for exporting userdata. The object userdata pointer is not exported to XML by default because hwloc does not know what it contains. This function lets applications set export_cb to a callback function that converts this opaque userdata into an exportable string. export_cb is invoked during XML export for each object whose userdata pointer is not NULL. The callback should use hwloc_export_obj_userdata() or hwloc_export_obj_userdata_base64() to actually export something to XML (possibly multiple times per object). export_cb may be set to NULL if userdata should not be exported to XML. void hwloc_topology_set_userdata_import_callback (hwloc_topology_ttopology, void(*)(hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length)import_cb) Set the application-specific callback for importing userdata. On XML import, userdata is ignored by default because hwloc does not know how to store it in memory. This function lets applications set import_cb to a callback function that will get the XML-stored userdata and store it in the object as expected by the application. import_cb is called during hwloc_topology_load() as many times as hwloc_export_obj_userdata() was called during export. The topology is not entirely setup yet. Object attributes are ready to consult, but links between objects are not. import_cb may be NULL if userdata should be ignored during import. Note: buffer contains length characters followed by a null byte (''). This function should be called before hwloc_topology_load(). Author Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Version 1.7 Sun Apr 7 2013 Exporting Topologies to XML.(3)
All times are GMT -4. The time now is 12:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy