Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Find the location of particular file and directory Post 302771702 by vbe on Thursday 21st of February 2013 09:22:24 AM
Old 02-21-2013
For that you would have to be more explicit:
The easiest being by showing us the 2 command you used, and say you the same result in one command line... Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to find a file named vijay in a directory using find command

I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem. so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies

2. Shell Programming and Scripting

Find a pattern in a file at a particular location

Hi all, I have a question on how to search for a pattern in a file and return a value if it is present at that particular location. How to read each line and each character for the pattern in the file of any format. Eg for the file format: attached the file (1 Reply)
Discussion started by: sparks
1 Replies

3. Shell Programming and Scripting

File created in a different location instead of desired location on using crontab

Hi, I am logging to a linux server through a user "user1" in /home directory. There is a script in a directory in 'root' for which all permissions are available including the directory. This script when executed creates a file in the directory. When the script is added to crontab, on... (1 Reply)
Discussion started by: archana.n
1 Replies

4. UNIX for Dummies Questions & Answers

How to find a file if we dont know exact location of file ?

Hi I want know "How to find a file if we dont know exact location of file ?" Thanks, Tushar Joshi:) (9 Replies)
Discussion started by: tusharjoshi
9 Replies

5. Shell Programming and Scripting

using find to go directly into a directory location

is there any other useful command to go into a specific directory and not go into its subdirectories that operates similar to find.? (it will return the full pathname?) or is there any way to make find not go into the subdirectories of the specified directory? This is on ksh as well. (3 Replies)
Discussion started by: bjhum33
3 Replies

6. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies

7. Shell Programming and Scripting

How to find a word and move it a specific location in xml file using perl?

Hi friends, I have one XML file having below structure :- INput XML file :- <?xml version="1.0" encoding="UTF-8"?> <START> <A=value1> <attr name1="a1"> </A> <B=value2> <attr name2="b1"> <attr name3="c1"> </B> </START> output xml file should be === (3 Replies)
Discussion started by: harpal singh
3 Replies

8. Shell Programming and Scripting

Find and Copy file of specific location

Dear All, I need to transfer all files present in one location to another but those files should be of specific extension like. Find and copy all files of extension .xls, .pdf, .txt from location usr/tmp to location /per/Treat (6 Replies)
Discussion started by: yadavricky
6 Replies

9. UNIX for Beginners Questions & Answers

How to find and get a file in an entire directory with an excluded directory specified?

How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on: $ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies

10. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
Tcl_Interp(3)						      Tcl Library Procedures						     Tcl_Interp(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_Interp - client-visible fields of interpreter structures SYNOPSIS
#include <tcl.h> typedef struct { char *result; Tcl_FreeProc *freeProc; int errorLine; } Tcl_Interp; typedef void Tcl_FreeProc(char *blockPtr); _________________________________________________________________ DESCRIPTION
The Tcl_CreateInterp procedure returns a pointer to a Tcl_Interp structure. This pointer is then passed into other Tcl procedures to process commands in the interpreter and perform other operations on the interpreter. Interpreter structures contain many fields that are used by Tcl, but only three that may be accessed by clients: result, freeProc, and errorLine. Note that access to all three fields, result, freeProc and errorLine is deprecated. Use Tcl_SetResult, Tcl_GetResult, and Tcl_GetReturnOp- | tions instead. The result and freeProc fields are used to return results or error messages from commands. This information is returned by command proce- dures back to Tcl_Eval, and by Tcl_Eval back to its callers. The result field points to the string that represents the result or error message, and the freeProc field tells how to dispose of the storage for the string when it is not needed anymore. The easiest way for com- mand procedures to manipulate these fields is to call procedures like Tcl_SetResult or Tcl_AppendResult; they will hide all the details of managing the fields. The description below is for those procedures that manipulate the fields directly. Whenever a command procedure returns, it must ensure that the result field of its interpreter points to the string being returned by the command. The result field must always point to a valid string. If a command wishes to return no result then interp->result should point to an empty string. Normally, results are assumed to be statically allocated, which means that the contents will not change before the next time Tcl_Eval is called or some other command procedure is invoked. In this case, the freeProc field must be zero. Alternatively, a command procedure may dynamically allocate its return value (e.g. using Tcl_Alloc) and store a pointer to it in interp->result. In this case, the command procedure must also set interp->freeProc to the address of a procedure that can free the value, or TCL_DYNAMIC if the storage was allocated directly by Tcl or by a call to Tcl_Alloc. If interp->freeProc is non-zero, then Tcl will call freeProc to free the space pointed to by interp->result before it invokes the next command. If a client procedure overwrites interp->result when interp->freeP- roc is non-zero, then it is responsible for calling freeProc to free the old interp->result (the Tcl_FreeResult macro should be used for this purpose). FreeProc should have arguments and result that match the Tcl_FreeProc declaration above: it receives a single argument which is a pointer to the result value to free. In most applications TCL_DYNAMIC is the only non-zero value ever used for freeProc. However, an application may store a different procedure address in freeProc in order to use an alternate memory allocator or in order to do other cleanup when the result memory is freed. As part of processing each command, Tcl_Eval initializes interp->result and interp->freeProc just before calling the command procedure for the command. The freeProc field will be initialized to zero, and interp->result will point to an empty string. Commands that do not return any value can simply leave the fields alone. Furthermore, the empty string pointed to by result is actually part of an array of TCL_RESULT_SIZE characters (approximately 200). If a command wishes to return a short string, it can simply copy it to the area pointed to by interp->result. Or, it can use the sprintf procedure to generate a short result string at the location pointed to by interp->result. It is a general convention in Tcl-based applications that the result of an interpreter is normally in the initialized state described in the previous paragraph. Procedures that manipulate an interpreter's result (e.g. by returning an error) will generally assume that the result has been initialized when the procedure is called. If such a procedure is to be called after the result has been changed, then Tcl_ResetResult should be called first to reset the result to its initialized state. The direct use of interp->result is strongly depre- cated (see Tcl_SetResult). The errorLine field is valid only after Tcl_Eval returns a TCL_ERROR return code. In this situation the errorLine field identifies the line number of the command being executed when the error occurred. The line numbers are relative to the command being executed: 1 means the first line of the command passed to Tcl_Eval, 2 means the second line, and so on. The errorLine field is typically used in conjunction with Tcl_AddErrorInfo to report information about where an error occurred. ErrorLine should not normally be modified except by Tcl_Eval. KEYWORDS
free, initialized, interpreter, malloc, result Tcl 7.5 Tcl_Interp(3)
All times are GMT -4. The time now is 11:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy