Sponsored Content
Full Discussion: excluding a character
Top Forums Shell Programming and Scripting excluding a character Post 46281 by caprikar on Monday 12th of January 2004 05:26:03 PM
Old 01-12-2004
excluding a character

Hi,
I want to compare the percentage value from the df -k output for which I'm doing:
df -k|grep u01|awk '{print $4}'
--this returns with % sign, how do i exclude this??
-Karthik
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cp -r excluding certain directories?

I want to recursively copy /home/me/someProject/* to a /home/you/ but I want to exclude directories called "classes". I can't find any option for excluding certain directories. Does such a thing exist, or any workaround, or am I missing something obvious> (2 Replies)
Discussion started by: sarnobat
2 Replies

2. Shell Programming and Scripting

cp -Rp excluding certain files?

Hi, I'm using cp -Rp to copy directories while preserving permissions. I want to exclude any ".lproj" files except for "English.lproj" and "en.lproj" from being copied, but the rest is copied as usual. Is there a way to do this (without using tar or other compression utilities) Thanks (3 Replies)
Discussion started by: pcwiz
3 Replies

3. UNIX for Advanced & Expert Users

Excluding a file from tar...

The title is not as easy as it sounds.... I am trying to exclude and file while ssh and untaring the file on the fly. The command I am using is... The command typically works but recently I've add the X option along with the exclude file. Essentially, the exclude file is being ignored when run... (2 Replies)
Discussion started by: lwif
2 Replies

4. Shell Programming and Scripting

Excluding file from tar

Hello i am using HP-UX rapdb2 B.11.23 U ia64 1068321383 unlimited-user license. I am tryiyng to exclude for tar all files that start with TOT* but i doues not work I am using: tar -cvf /ODS/prepaid/CDR_FLOW/WORK/backup.tar --exclude='TOT*' and i get the error: tar: cannot stat... (3 Replies)
Discussion started by: chriss_58
3 Replies

5. Shell Programming and Scripting

Excluding directory during deleting

Hi all, I'm trying to work on a script to delete files older then 31 day's in certain directories. Now, that works, but in one directory there are 3 other maps which contains files that can be deleted but one map which contains files that can't be deleted. My current command is: find... (6 Replies)
Discussion started by: JasperG
6 Replies

6. Shell Programming and Scripting

Excluding a directory

i want to search files in public_html of all users and exclude any directories named "uploads" or "albums" (because there are many files in these), just skip them completely now im doing something like find /home/*/public_html -regex ".*\(php\|html\|htm\)$" -path albums -prune -o -type f... (1 Reply)
Discussion started by: vanessafan99
1 Replies

7. Shell Programming and Scripting

Help needed in excluding word

Hello, When i run this command find ./ -type f -print | xargs grep -l 'myWord' it prints the file name where 'myWord' exists and also something like the below which i want to exclude grep: can't open Fields grep: can't open Search I tried piping and grep -v 'open' but it did not work. ... (3 Replies)
Discussion started by: jakSun8
3 Replies

8. Shell Programming and Scripting

Excluding directories from a find

I've looked at a few similar threads, but I can't bridge from those examples to what I'm working on, so I'm hoping someone can help. I want to extend the following statement find $PathToCheck -type f \( -not -iwholename "$ScriptDir/*" \) -exec md5sum "{}" \;>$NewSigs to exclude several... (9 Replies)
Discussion started by: nixie
9 Replies

9. Shell Programming and Scripting

Excluding the unwanted rows

# Total Table name -----------------------+--------+--------------------------------+--------------------------+--------------- GK_AMP GK_AMP GK_AMP GK_AMP GK_AMP GK_AMP (6 how can i extract only table name excluding other lines ?pls suggest (4 Replies)
Discussion started by: rocking77
4 Replies

10. UNIX for Beginners Questions & Answers

Rm * excluding one file

Hi All, I am trying to remove below file except the last one. With wild char It is removing all. Is there a way to exclude only one file and remove files: MM_6000_001 MM_6000_002 MM_6000_003 MM_6000_004 if I do rm * it is removing all. I want the exclude and remove others. any... (14 Replies)
Discussion started by: arunkumar_mca
14 Replies
regex(3)						     Library Functions Manual							  regex(3)

Name
       re_comp, re_exec - regular expression handler

Syntax
       char *re_comp(s)
       char *s;

       re_exec(s)
       char *s;

Description
       The  subroutine	compiles  a string into an internal form suitable for pattern matching.  The subroutine checks the argument string against
       the last string passed to

       The subroutine returns 0 if the string s was compiled successfully; otherwise a string containing an  error  message  is  returned.  If	is
       passed 0 or a null string, it returns without changing the currently compiled regular expression.

       The  subroutine returns 1 if the string s matches the last compiled regular expression, 0 if the string s failed to match the last compiled
       regular expression, and -1 if the compiled regular expression was invalid (indicating an internal error).

       The strings passed to both and may have trailing or embedded newline characters; they are terminated by	nulls.	 The  regular  expressions
       recognized are described in the manual entry for given the above difference.

Diagnostics
       The subroutine returns -1 for an internal error.

       The subroutine returns one of the following strings if an error occurs:

       No previous regular expression
       Regular expression too long
       unmatched (
       missing ]
       too many () pairs
       unmatched )

See Also
       ed(1), ex(1), egrep(1), fgrep(1), grep(1)

																	  regex(3)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy