Sponsored Content
Full Discussion: Find file directory
Top Forums Shell Programming and Scripting Find file directory Post 302466877 by magesh_bala on Wednesday 27th of October 2010 03:11:53 PM
Old 10-27-2010
This is not working and more over I am not able to assign the value to the variable

Code:
var_DataSourcePath=$1
var_SourceFileName=$2
var_SearchFile= `find $var_DataSourcePath -type d -name $var_SourceFileName`
echo "$var_SearchFile"
echo "Search complete"

Output:
Code:
c:/magesh/test/testfile.txt

Expected output is :
Code:
c:/magesh/test/

I am not getting the Search complete msg, any one can please help?

Last edited by Scott; 10-27-2010 at 04:19 PM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to find a corrupted file in a directory

Hi, Dunno if this has already been discussed but can anyone tell me if there is any utility/command to find a corrupted file in an unix directory. With smile, karthik (1 Reply)
Discussion started by: skarthik_d
1 Replies

2. 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

3. AIX

find for specific content in file in the directory and list only file names

Hi, I am trying to find the content of file using grep and find command and list only the file names but i am getting entire file list of files in the directory find . -exec grep "test" {} \; -ls Can anyone of you correct this (2 Replies)
Discussion started by: madhu_Jagarapu
2 Replies

4. Shell Programming and Scripting

find and copy file to another directory..

Hi Everybody, i want a samll help to write a script. i had source location with :/user/bin (bin contains subdirectories with like names emails etc and had several files in each subdirectory) and target location with :/usr/scripts (having same subdirectories names and had some files)... (1 Reply)
Discussion started by: Reddy482
1 Replies

5. Shell Programming and Scripting

Find file in a directory

Hi, I'm trying to write a script that search file in folder. I got problems with selecting specific file from the list of the files. when I runing the script I get a list of files instead of one specific file. I'm new with linux :) #!/bin/bash FILE=false ISFOUND=false while getopts... (6 Replies)
Discussion started by: SimonBASH
6 Replies

6. Shell Programming and Scripting

Find file only from a Directory

Hi, I am using the below query to find files from a Directory: SOURCE_DIR--Directory Files in the Directory: ABC.log XYZ.out The SOURCE_DIR has subdirectory.... when i use the below command... find /apps/informatica/node1/scripts/test '(' -name '*.log' -o -name '*.out'... (12 Replies)
Discussion started by: ch33ry
12 Replies

7. UNIX for Dummies Questions & Answers

cannot find file directory

hi, i use command at below to copy the file and put it in the new file (if no such file, it will create right ) cat id_rsa.pub >>~/.ssh/authorized_keys it give me error bash: /home/pc2/.ssh/authorized_keys : No such file or directory can anyone tell me why this happened ? thanks in... (1 Reply)
Discussion started by: Ericyue
1 Replies

8. Shell Programming and Scripting

how to find a pattern from an external file in a directory containing multiple file recursively

Hi, Need your help in this. I have an input file that has multiple enrollment_number, somewhat like 1234567 8901234 9856321 6732187 7623465 Now i have to search and delete these enrollment_number recursively from all the files that are within multiple sub-directories of a... (10 Replies)
Discussion started by: mukulverma2408
10 Replies

9. Solaris

/bin/find: stat() error <File> : No such file or directory

Hi, I am getting below error in Solaris 10 SPARC when trying to issue a search on /var/tmp partition Below is the query /bin/find /var/tmp/ -type f -atime +1 Below is the result /bin/find: stat() error <File> : No such file or directory (28 Replies)
Discussion started by: prash358
28 Replies

10. 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
GO-TESTFUNC(7)						 Miscellaneous Information Manual					    GO-TESTFUNC(7)

NAME
go - tool for managing Go source code DESCRIPTION
The 'go test' command expects to find test, benchmark, and example functions in the "*_test.go" files corresponding to the package under test. A test function is one named TestXXX (where XXX is any alphanumeric string not starting with a lower case letter) and should have the sig- nature, func TestXXX(t *testing.T) { ... } A benchmark function is one named BenchmarkXXX and should have the signature, func BenchmarkXXX(b *testing.B) { ... } An example function is similar to a test function but, instead of using *testing.T to report success or failure, prints output to os.Stdout and os.Stderr. That output is compared against the function's "Output:" comment, which must be the last comment in the function body (see example below). An example with no such comment, or with no text after "Output:" is compiled but not executed. Godoc displays the body of ExampleXXX to demonstrate the use of the function, constant, or variable XXX. An example of a method M with receiver type T or *T is named ExampleT_M. There may be multiple examples for a given function, constant, or variable, distinguished by a trailing _xxx, where xxx is a suffix not beginning with an upper case letter. Here is an example of an example: func ExamplePrintln() { Println("The output of this example.") // Output: The output of // this example. } The entire test file is presented as the example when it contains a single example function, at least one other function, type, variable, or constant declaration, and no test or benchmark functions. See the documentation of the testing package for more information. AUTHOR
This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others). 2012-05-13 GO-TESTFUNC(7)
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy