Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Listing all the files names not starting as Post 302261313 by Franklin52 on Monday 24th of November 2008 10:34:49 AM
Old 11-24-2008
I get the desired output with the code. I've saved the contents of your output, added the lines abc.out and efg.out and this is what I get:

Code:
$ cat file
-rwxrwxrwx  1 oratest4 dba      8 2008-11-24 09:45 ERROR_ESRC_CHQ_GBP_1234.out
-rwxrwxrwx  1 oratest4 dba      8 2008-11-20 15:27 ESRC_CHQ_GBP_1234.out
-rwxrwxrwx  1 oratest4 dba   8878 2008-11-21 13:30 FTPED_FTPED_PAYMENT_FILES_TRANSFER.sh
-rwxrwxrwx  1 oratest4 dba   7920 2008-11-20 12:15 FTPED_FTPED_RCUK_FTP.sh
-rw-r--r--  1 oratest4 dba   7526 2008-11-24 15:13 ftp_script_new.sh
-rw-r--r--  1 oratest4 dba   7526 2008-11-24 15:13 abc.out
-rw-r--r--  1 oratest4 dba   7526 2008-11-24 15:13 efg.out
drwxrwxrwx  2 oratest4 dba 106496 2008-11-24 15:16 temp
$
$
$ awk '/^-/ && $NF !~ /^abc/ && $NF !~ /^efg/ && $NF ~ /.out/ {print $NF}' file
ERROR_ESRC_CHQ_GBP_1234.out
ESRC_CHQ_GBP_1234.out
$
$

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

2. UNIX for Dummies Questions & Answers

Listing full file names with the exact length of 3 characters

This is what I have to do: Display the full file name (including the full path) and file size of all files whose name (excluding the path) is exactly 3 characters long. This is the code I have: find / -printf "Name: %f Path: %h Size: %s (bytes)\n" 2>/dev/null | grep -E "Name: .{3,} Path" |... (7 Replies)
Discussion started by: Joesgrrrl
7 Replies

3. Shell Programming and Scripting

perl script for listing files and mailing the all files

Hi, I am new to perl: I need to write perl script to list all the files present in directory and mail should be come to my inbox with all the files present in that directory. advanced thanks for valuable inputs. Thanks Prakash GR (1 Reply)
Discussion started by: prakash.gr
1 Replies

4. Shell Programming and Scripting

Listing file names as soon as they are created

Hi, I have been looking for a method to list file names as soon as they are created. I have used the following command : find . -name "*.xml" -mmin -2 -exec ls --full-time {} \; | sort -k6 this finds all xml files created in the last 2 minutes and orders them by time. The problem is that... (7 Replies)
Discussion started by: phil.e.b
7 Replies

5. UNIX for Advanced & Expert Users

script regarding listing long group names

Hello, When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated. Can someone help with the script which would display the truncated group name? I appreciate if someone could help in this regard. (1 Reply)
Discussion started by: mike12
1 Replies

6. Shell Programming and Scripting

Get all File names starting with letter P

Hi, I have lets say 10 files , I need to process them one by one. So I need a command to get one file name at a time to process it into a variable Example Files P1111.dat P3344.dat S344.dat ... v_file_name = 'p111.dat' .. I will rename it to something after processing ... (1 Reply)
Discussion started by: prassu
1 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Listing files starting with p or f and with the exact length of 3 characters

Hello, I need some help. How can I list files starting with p or f and with the exact length of 3 characters? (2 Replies)
Discussion started by: airbebe
2 Replies

8. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

9. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies

10. UNIX for Dummies Questions & Answers

Listing column names in CSV file

Hi, I have a .csv file that has ~600 columns and thousands of rows. I would like to create a numerical list of the column names (so that I can later easily select the columns I want to extract). The format that I would hope for is something like: 1 "ID" 2 "X" 3 "Y" .. 600 "Z" ... (4 Replies)
Discussion started by: aberg
4 Replies
CUBRID_PCONNECT_WITH_URL(3)						 1					       CUBRID_PCONNECT_WITH_URL(3)

cubrid_pconnect_with_url - Open a persistent connection to CUBRID server

SYNOPSIS
resource cubrid_pconnect_with_url (string $conn_url, [string $userid], [string $passwd]) DESCRIPTION
Establishes a persistent connection to a CUBRID server. cubrid_pconnect_with_url(3) acts very much like cubrid_connect_with_url(3) with two major differences. First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, port, dbname and userid. If one is found, an identifier for it will be returned instead of opening a new connection. Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (cubrid_close(3) or cubrid_disconnect(3) will not close links established by cubrid_pconnect_with_url(3)). This type of link is therefore called 'persistent'. <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] <properties> ::= <property> [&<property>] <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] <properties> ::= login_timeout=<milli_sec> <properties> ::= query_timeout=<milli_sec> <properties> ::= disconnect_on_query_timeout=true|false <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] <host> := HOSTNAME | IP_ADDR <time> := SECOND <milli_sec> := MILLI SECOND ohost : A host name or IP address of the master database odb_name : A name of the database odb_user : A name of the database user odb_password : A database user password o alhosts : Specifies the broker information of the standby server, which is used for failover when it is impossible to connect to the active server. You can specify multiple brokers for failover, and the connection to the brokers is attempted in the order listed in alhosts o rctime : An interval between the attempts to connect to the active broker in which failure occurred. After a failure occurs, the system connects to the broker specified by althosts (failover), terminates the transaction, and then attempts to connect to the active broker of the master database at every rctime. The default value is 600 seconds. o login_timeout : Timeout value (unit: msec.) for database login. The default value is 0, which means infinite postponement. o query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, a message to cancel requesting a query transferred to server is sent. The return value can depend on the disconnect_on_query_timeout configuration; even though the message to cancel a request is sent to server, that request may succeed. o disconnect_on_query_timeout : Configures a value whether to immediately return an error of function being executed upon timeout. The default value is false. Note ? and : that are used as identifiers in PHP connection URL can't be included in the password. The following is an example of a pass- word that is invalid to use as connection URL because it contains " ?:". $url = "CUBRID:localhost:33000:tdb:dba:12?:?login_timeout=100"; Passwords that contain ? or : may be passed as a separate parameter. $url = "CUBRID:localhost:33000:tbd:::?login_timeout=100"; $conn = cubrid_pconnect_with_url ($url, "dba", "12?"); If user or password is empty,you can't delete " :",the following is an example. $url = "CUBRID:localhost:33000:demodb:::"; PARAMETERS
o $conn_url -A character string that contains server connection information. o $userid -User name for the database. o $passwd -User password. RETURN VALUES
Connection identifier, when process is successful. FALSE, when process is unsuccessful. EXAMPLES
Example #1 cubrid_pconnect_with_url(3) url without properties example <?php $conn_url = "CUBRID:127.0.0.1:33000:demodb:dba::" $con = cubrid_pconnect_with_url ($conn_url); if ($con) { echo "connected successfully"; cubrid_execute($con, "create table person(id int,name char(16))"); $req =cubrid_execute($con, "insert into person values(1,'James')"); if ($req) { cubrid_close_request ($req); cubrid_commit ($con); } else { cubrid_rollback ($con); } cubrid_disconnect ($con); } ?> Example #2 cubrid_pconnect_with_url(3) url with properties example <?php $conn_url = "CUBRID:127.0.0.1:33000:demodb:dba::?althost=10.34.63.132:33088&rctime=100" $con = cubrid_pconnect_with_url ($conn_url); if ($con) { echo "connected successfully"; $req =cubrid_execute($con, "insert into person values(1,'James')"); if ($req) { cubrid_close_request ($req); cubrid_commit ($con); } else { cubrid_rollback ($con); } cubrid_disconnect ($con); } ?> SEE ALSO
cubrid_connect(3), cubrid_pconnect(3), cubrid_pconnect_with_url(3), cubrid_disconnect(3), cubrid_close(3). PHP Documentation Group CUBRID_PCONNECT_WITH_URL(3)
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy