Sponsored Content
Top Forums Shell Programming and Scripting How to check line existence in shell ? Post 302905950 by chacko193 on Monday 16th of June 2014 08:24:55 AM
Old 06-16-2014
Quote:
Originally Posted by chacko193
Try:
Code:
PATTERN= "\*\.debug[[:space:]]*\@vxhgt-hskhng02[[:space:]]*"

There is a typo in my last post. There should have been no space in the assignment operation.

Code:
# cat testIn
abc.conf
authpriv.*                                              /var/log/secure
mail.*                                                  -/var/log/maillog
*.debug  @vxhgt-hskhng02
cron.*                                                  /var/log/cron
# PATTERN="\*\.debug[[:space:]]*\@vxhgt-hskhng02[[:space:]]*"
# if grep -q $PATTERN testIn
> then
> echo "Pattern found"
> else
> echo "Pattern Not found"
> fi
Pattern found


Last edited by chacko193; 06-16-2014 at 09:26 AM.. Reason: typo
This User Gave Thanks to chacko193 For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

How to check the file existence using shell scripting in Solaris-10

Hi, I have a script which will check the fiel existence, the lines are as below if !(test -d ./data) then mkdir data fi In the first line error occurs as below generatelicense.sh: syntax error at line 2: `!' unexpected Where as this script works fine in linux OS. How to solve... (2 Replies)
Discussion started by: krevathi1912
2 Replies

2. UNIX for Advanced & Expert Users

Check existence of a login

Hi everybody, I need to check in C program wether a given login is known on the system. Is there any system function that could do this ? So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by... (10 Replies)
Discussion started by: xavier054
10 Replies

3. AIX

how to check the existence of a file during ftp using korn shell?

i can able to transfer a file from build server(AIX)to webserver using ksh through ftp.my query is to check the existence of file while transfering from one server to other .i.e i need some command or script that checks the existence of file with same name in both server,within ftp syntax. ... (1 Reply)
Discussion started by: karthikprasathk
1 Replies

4. AIX

how to check the existence of a file using korn shell?

we have tranferred an ear from local server to remote server using ftp.consider, we have an ear file named a.ear in remote server,again if we transfer the same file named a.ear from local server to remote server.we need the kshell to check the existence of the ear file in remote server,and if the... (3 Replies)
Discussion started by: karthikprasathk
3 Replies

5. AIX

check for file existence

Hello I am having a requirement like if there is no file in the directory then i need a message to pop on after the execution of the script. My script basically does for File in `ls -t $DIRECTORY | tail -1`; if there is no file the DIRECTORY then the script is simply exiting with out... (2 Replies)
Discussion started by: dsdev_123
2 Replies

6. AIX

Check for File Existence

I have requirement where i need to search for files which start with SALESORDER and PURCHASEORDER. i need to process the files with SALESORDER first and then PURCHASEORDER. If SALESORDER files are not there i dont want to process PURCHASEORDER and i want to come out of script. I have written a code... (4 Replies)
Discussion started by: dsdev_123
4 Replies

7. Shell Programming and Scripting

shell :: check directory existence

Hi All, I have shell script and I need to check if some directory exist. I'm don't have the information if that directory is written in upper case or lowcase or mixed. Is there anyway to check the existence of that directory by ignoring case senestive? Thanks (3 Replies)
Discussion started by: Alalush
3 Replies

8. Shell Programming and Scripting

check existence of the path

Hi How can I check if the path exist or not? echo "Enter path:"; read my_path; ##I should check whether my_path exists or not.... (5 Replies)
Discussion started by: tjay83
5 Replies

9. Shell Programming and Scripting

one line command to check file existence and FTP it

Hi all, I need a batch script to Check for existence of file say i check for files with extension xml.done in C:\Myfile.(This folder contains .xml file and its corresponding .done files) If the .done file exists then it should FTP the corresponding .xml file to UNIX. Is this possible to do... (6 Replies)
Discussion started by: Codesearcher
6 Replies

10. Shell Programming and Scripting

Check the Files existence

Hi I have a requirement to check whether the files exists, then it will call other steps in shell script. I did ls *.csv|wc -l if then checking the count of the files should be more than 1 then it will call other steps. I am getting the error that too many arguements as there n... (13 Replies)
Discussion started by: cnrj
13 Replies
uusched(1M)						  System Administration Commands					       uusched(1M)

NAME
uusched - uucp file transport program scheduler SYNOPSIS
/usr/lib/uucp/uusched [-u debug-level] [-x debug-level] DESCRIPTION
uusched is the uucp(1C) file transport scheduler. It is usually started by the daemon uudemon.hour that is started by cron(1M) from an entry in user uucp's crontab file: 11,41 * * * * /etc/uucp/uucp/uudemon.hour OPTIONS
The options are for debugging purposes only. debug-level is a number between 0 and 9. Higher numbers give more detailed debugging infor- mation: The following options are supported: -u debug-level Passes the -u debug-level option uucico(1M) as -x debug-level. -x debug-level Outputs debugging messages from uusched. FILES
/etc/uucp/Devices /etc/uucp/Permissions /etc/uucp/Systems /var/spool/locks/* /var/spool/uucp/* /var/spool/uucppublic/* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbnuu | +-----------------------------+-----------------------------+ SEE ALSO
uucp(1C), uustat(1C), uux(1C), cron(1M), uucico(1M), attributes(5) SunOS 5.10 19 May 1993 uusched(1M)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy