Sponsored Content
Top Forums Shell Programming and Scripting List directory name (only once) after multiple file extensions found Post 302572613 by mmab on Thursday 10th of November 2011 11:18:33 AM
Old 11-10-2011
thanks for the quick response. I tried your method but got '-printf is not a valid option'. I tried it using just 'print' and got 'There is a missing conjunction'
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Truncate multiple file extensions

Hi, I have files with names like file1.txt.txt.txt.txt and file2.txt.txt.txt.txt.txt............ (random infinite number of .txt exist). how to truncate (mv) their names to ones with single .txt extension like file1.txt and file1.txt ? In other words, how to extract the filename upto first... (12 Replies)
Discussion started by: prvnrk
12 Replies

2. Shell Programming and Scripting

Stripping out extensions when file has multiple dots in name

I posted this already in another thread, but was told that I should create a seperate thread for the following question: How do I strip the extension when the delimiter might occur multiple times in the filename? For example: I have 2 files as input for my script. test.extension... (8 Replies)
Discussion started by: Nemelis
8 Replies

3. Shell Programming and Scripting

[help]Delete or replace text in multiple file and multiple directory

here's the case : almost of php/html file on my site has added the text : <iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
Discussion started by: dzufauzan
16 Replies

4. Shell Programming and Scripting

How to create multiple list of files in a directory ?

Hi, i have say 100 files in a directory. file1.log file2.log file3.log file4.log file5.log file6.log ... ... ... file99.log file100.log ========= I need to create another file which contains the list of al these log files. each file should contain only 10 log file names. it shud... (4 Replies)
Discussion started by: robinbannis
4 Replies

5. Shell Programming and Scripting

file extensions in a directory structure

Hi, I have a huge directory structure with multiple directories and subdirectories in each of the directory. i am trying to find the various file extensions in the directory structure and put them into a file. is there any way through which i can accomplish this (4 Replies)
Discussion started by: itsritish
4 Replies

6. Shell Programming and Scripting

Renaming of files with different extensions on the same path to .found with the help of loop

hi , I have certain files at the same path with differeent extensions like .dat , .txt etc ...........i need to rename them with extension .found at the same path with the help of loop.... also the files names will be like this ; abc_2010_c1.dat abc_2010_c2.dat xyz_2010_c1.txt (2 Replies)
Discussion started by: amitpta
2 Replies

7. UNIX for Advanced & Expert Users

Watch directory and move specific file extensions

Hi all, This is actually more for my lazyness then anything else, but I think others might find it useful to use as well. Basically this is what I am trying to achieve... In my ubuntu home dir under Downloads is where firefox saves everything by default, now I know that you can manually... (3 Replies)
Discussion started by: STOIE
3 Replies

8. Red Hat

No such file or directory found?

what’s going on these commands (/tmpdir %) ls Foo (tmpdir % )cat foo Cat:foo! No such file or directory any help me out i checked with permission...even though it is not working (1 Reply)
Discussion started by: rajeshz
1 Replies

9. Shell Programming and Scripting

Check if files inside a text file are found under a directory

Hi all, Please somebody help me with this: I want to check if the files listed in a text file, are found under a directory or not. For example: the file is list_of_files.txt, which contains inside this rows: # cat list_of_files logs errors paths debug # I want to check if these... (3 Replies)
Discussion started by: arrals_vl
3 Replies

10. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies
wbemexec(1)															       wbemexec(1)

NAME
wbemexec - submit a CIM operation request to a CIM Server SYNOPSIS
wbemexec [ -h hostname ] [ -p portnumber ] [ -v httpversion ] [ -m httpmethod ] [ -t timeout ] [ -u username ] [ -w password ] [ -s ] [ --help ] [ --version ] [ inputfilepath ] DESCRIPTION
The wbemexec command provides a command line interface to a CIM Server. The input to the command consists of a CIM request encoded in XML. The request is submitted to the CIM Server for execution. If the HTTP response from the CIM Server contains a status code of 200 (OK), the result returned to stdout is the CIM response encoded in XML. Otherwise, the result returned to stdout is the HTTP response. Some types of invalid XML requests (e.g. missing PROTOCOLVERSION attribute or missing NAME attribute) are detected by wbemexec, and result in an error message from wbemexec. Other invalid XML requests (e.g. invalid CIMVERSION attribute value or missing XML version), are detected by the CIM Server, and result in an HTTP response, containing a non-Success status code, such as 501 (Not Implemented) or 400 (Bad Request). By default, the request is sent as an HTTP/1.1 request, using the HTTP M-POST method, and wbemexec waits 20000 milliseconds (20 seconds), then times out if a response hasn't been received. Input is read from stdin, if no input file is specified. By default, the operation is executed on the local host. wbemexec first attempts to connect to the CIM Server on the default port for the wbem-http service, and if that fails, another attempt is made on the default port for the wbem-https service. Options wbemexec recognizes the following options: -h hostname Connect to the CIM Server on the specified host. If this option is not specified, wbemexec connects to the local host. --help Display command usage information. -m httpmethod Use the specified HTTP method for the request. The method must be "POST" or "M-POST". -p portnumber Connect to the CIM Server on the specified port number. If this option is not specified, wbemexec connects to the default port for the wbem-http service, or if the -s option is specified, to the default port for the wbem-https ser- vice. -s Enable the use of the SSL protocol between and the CIM server. The -s option should be specified if the CIM Server on the specified hostname/portnumber expects clients to connect using HTTPS. -t timeout Wait the specified number of milliseconds on sending a request, before timing out if no response has been received. The timeout value must be an integer value greater than 0. -u username Connect as the specified R username . If username is not specified, the current logged in user is used for authenti- cation. This option is ignored if neither hostname nor portnumber is specified. -v httpversion Use the specified HTTP version for the request. The version must be "1.0" or "1.1". The 1.0 version may not be specified if the M-POST method is specified. --version Display CIM Server version. -w password Authenticate the connection using the specified password . This option is ignored if neither hostname nor portnumber is specified. WARNING: A password should not be specified on the command line on a multi-user system, since command- line options are typically world-readable for a short window of time. If the remote host requests authentication and this option is not specified, wbemexec will prompt for the password. (See cimconfig (1) for information on configur- ing the CIM Server.) EXIT STATUS
When an error occurs, an explanatory error message is written to stderr and an appropriate value is returned. The following exit values are returned: 0 Success 1 Error USAGE NOTE
The wbemexec command requires that the CIM Server is running. EXAMPLES
Submit an XML request contained in the file cimrequest.xml to the CIM Server running on the local host on the default port: wbemexec cimrequest.xml Submit an XML request contained in the file cimrequest.xml to the CIM Server running on the host hpserver on port 49152, using the username guest and password guest for authentication: wbemexec -h hpserver -p 49152 -u guest -w guest cimrequest.xml SEE ALSO
cimserver(1), cimconfig(1). STANDARDS CONFORMANCE
wbemexec: CIM Operations over HTTP 1.0, Representation of CIM in XML 2.0 wbemexec(1)
All times are GMT -4. The time now is 06:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy