Sponsored Content
Top Forums Shell Programming and Scripting HOW TO CHECK ONLY .C FILES EXISTS OR NOT IN A FOLDER using IF in C shell script? Post 302284192 by clx on Thursday 5th of February 2009 12:53:29 AM
Old 02-05-2009
pl post whtever u have written.
again if possible, sample file name ( u want to be found )
OS flavor?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check Remote Folder Exists

Hi, I want to sftp some files to a remote directory. Before transferring files i want to check whether the required folder exists. If so copy the files to that folder, else create the folder and copy the files. Thanks in adv (1 Reply)
Discussion started by: borncrazy
1 Replies

2. Shell Programming and Scripting

simple check to see if a folder exists

Hi, I have cobbled together a simple script to create a Windows folder in a bunch of home folders on a mac server using the following code. for i in /Volumes/student_data/studenthomefolders/* do u=`echo $i | cut -d/ -f5` //if //then //echo "Folder already exists for "$u" Skipping" //else... (4 Replies)
Discussion started by: psyman
4 Replies

3. Shell Programming and Scripting

check if file exists in a mounted windows shared folder

hi, I posted a thread before on that subject, but with a wrong focus... here's my problem: I want to check if a file exists in a windows shared folder mounted using: sudo mount -t cifs -o username=xxx,password=xxx,uid=xxx,gid=xxx //192.168.0.92/public /media/92_shared I tried if ... (2 Replies)
Discussion started by: jul
2 Replies

4. Shell Programming and Scripting

Shell script to check if any file exists in 4 folders

Hi All, working on AIX 5.3. Requirement is: Shell script in ksh to check if any file exists in 4 folders as below: 1. /FILE/INB/INT1 2. /FILE/INB/INT2 3. /FILE/INB/INT3 4. /FILE/INB/INT4 Thanks a lot for your time! a1_win. (3 Replies)
Discussion started by: a1_win
3 Replies

5. Shell Programming and Scripting

Check if user exists shell

Hello! I'm stuck with a problem that i can't solve. I'm very new to unix, linux and shell scripting i might add. I'm trying to create a script that will execute as follows: First start the script - sh exist Then the prompt asks the user to input a username to check if it exists within the... (6 Replies)
Discussion started by: bib2006
6 Replies

6. UNIX for Dummies Questions & Answers

Assistance with shell script to check file type and move to a folder.

Hi, Below is some code that I would like to implement however I am getting these errors: (what I am attempting to do is to check if a zip file has ascii files and if ascii and not binary then move the ascii files to a folder. some of the files are in xml format but are ascii and i will be moving... (0 Replies)
Discussion started by: bwcberb
0 Replies

7. Shell Programming and Scripting

Check if remote folder exists

Hi, When trying to chk if a folder exists on remote server using the below command (got it from other thread in this forum) "ifvchr@s1.mrix.local '/cygdrive/d/shares/projects\ data\ load/test\ files/$SCPED_FILES$name$code'`]; then echo "Directory exists"; else echo "Directory... (0 Replies)
Discussion started by: funonnet
0 Replies

8. Shell Programming and Scripting

BatchScript/Unix shell Script to check folder in Windows server

Hi, It will be great help if any of them can provide or tell which scripting is possible to write for checking folder exists or not in Windows server from Unix/Windows machine. If folder doesn't exist then need to create the folder through script and copy the files. It is on very... (1 Reply)
Discussion started by: prakashchakra7
1 Replies

9. Shell Programming and Scripting

Shell script which will check the target file and folder exists and copy it

Hi All, I am a beginner in this and trying to write a shell script in linux which will : 1. Ask for a file name and check if its exists. 2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists. 3. If target folder... (3 Replies)
Discussion started by: ashish_neekhra
3 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
GPT-QUERY(8)						User Contributed Perl Documentation					      GPT-QUERY(8)

NAME
gpt-query - Queries an installation for packages SYNOPSIS
gpt-query [-name=Name -flavor=Flavor -pkgtype=Type --help -file=name -man -deps=run|sdk] [pkgname-flavor-pkgtype+] DESCRIPTION
gpt-query searches installed packages for matches to the query. Name is the name of the package. Flavor is the information about linking and compile options used on package. Type is the type of the package. ? will alow the use to access system help. The user may enter a value for any of the options. These options can be used in combination or not at all. The script will take the options being used and try to find all matching items. An alternate form is to use the pkgname-flavor-pkgtype tuples. Multiple of instances of these tuples can be used in a query. OPTIONS
-name=NAME Returns all of the packages matching NAME. -flavor=FLAVOR Returns all of the packages matching FLAVOR. -pkgtype=TYPE Returns all of the packages matching TYPE. -file=FILE Returns the package owning the FILE. FILE needs to be either an absolute path or referenced to $GLOBUS_LOCATION. -deps=run|sdk Returns the runtime or build dependencies of a package. -help Print a brief help message and exits. -man Prints the manual page and exits. -version Prints the version of GPT and exits. -what-bundles Prints a list of the installed bundles. -verify-bundle=BUNDLE Takes a bundle defintion and checks to see if it matches the installation. -bundle-packages=BUNDLE List the packages that belong to the desired bundle. -bundle BUNDLE 1 [BUNDLE 2] If two bundles are given, the bundles will be compared to one another for equality. If only one bundle is given, the bundle will be checked against the installation. This command works on tar bundles. EXAMPLES
gpt-query Returns a listing of all of the installed packages. gpt-query -name=foo Returns all flavors and package types with the name "foo". gpt-query foo Also returns all flavors and package types with the name "foo". gpt-query 'foo-*-*' A third way of typing the same query. Note the single quotes. gpt-query '*-noflavor-*' List all of the packages with a 'noflavor' build flavor. gpt-query -file=libexec/globus-build-env-gcc32.sh Returns "/libexec/globus-build-env-gcc32.sh is owned by globus_core-gcc32-rtl" gpt-query -file=$GLOBUS_LOCATION/libexec/globus-build-env-gcc32.sh Returns the same. gpt-query -file=globus-build-env-gcc32.sh Returns an error because the path is incorrect. OUTPUT
Here is an example output: gpt-query '*-noflavor-*' 4 packages were found in /home/mbletzin/work/install that matched your query: packages found that matched your query globus_core-noflavor-data ver: 2.1 cmp id: 2.1.0 globus_core_setup-noflavor-pgm ver: 2.0 cmp id: 2.0.0 globus_ssl_utils-noflavor-data ver: 2.1 cmp id: 2.1.0 kca_setup-noflavor-pgm ver: 3.0.2p1 cmp id: 1.0.0 For each package name, flavor, package type, version, and the compatibility identifier is return. The compatibility identifier is what is used to resolve dependencies. SEE ALSO
gpt-install(8) gpt-uninstall(8) gpt-verify(8) gpt-postinstall(8) AUTHOR
Michael Bletzinger <mbletzin.ncsa.uiuc.edu> and Eric Blau <eblau.ncsa.uiuc.edu> perl v5.14.2 2012-04-30 GPT-QUERY(8)
All times are GMT -4. The time now is 06:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy