Sponsored Content
Top Forums Shell Programming and Scripting perl - how do i find out if a file doesn't contain a pattern? Post 302136526 by mjays on Tuesday 18th of September 2007 07:16:43 AM
Old 09-18-2007
thanks guys.

i can use either of those ideas but cbkihong's will be easier to read.

bit annoyed that i didn't think of that myself. i've written loads of unix shell scripts using the 'set variable' method.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

HELP! PERL script to find matched pattern

Hi all, I just learnt Perl and I encountered a problem in my current project. For a verilog file, i am required to write a PERL script that could match pattern to output nitrolink and nitropack. I wont know what name to grep except the pattern below. the verilog file: nitrolink nitrolink... (1 Reply)
Discussion started by: kimhuat
1 Replies

2. Shell Programming and Scripting

How to find this pattern in a file

hi all i have a file in my box, which is so huge and full file is in a single line. In this file i have to look for a pattern "ABC01234567" In this above mentioned pattern ABC is fixed and number might change . it will a eight digit random number Thanks so much for all you help ... (1 Reply)
Discussion started by: Prateek007
1 Replies

3. Shell Programming and Scripting

To find a pattern in file

Hi, I would like to find a pattern in a file as follows: I would like to find "or" "OR" "and" "AND" between two numeric values. I have tried this: grep '**or*' But does not work. Appreciate help on this. (4 Replies)
Discussion started by: pinnacle
4 Replies

4. UNIX for Dummies Questions & Answers

PERL pattern matching in a file

Hi Gurus, I have a file like below.. I have to match each with predefined pattern. If matches then have to write the entire record to a separate file. If not make the value as NULL and write the entire record into another file. | is the delimiter ravi123|2344|M R123Vi|2345|F... (8 Replies)
Discussion started by: pvksandeep
8 Replies

5. Shell Programming and Scripting

how to find a pattern from an external file in a directory containing multiple file recursively

Hi, Need your help in this. I have an input file that has multiple enrollment_number, somewhat like 1234567 8901234 9856321 6732187 7623465 Now i have to search and delete these enrollment_number recursively from all the files that are within multiple sub-directories of a... (10 Replies)
Discussion started by: mukulverma2408
10 Replies

6. Shell Programming and Scripting

Why regex pattern doesn't work in find?

$ find /opt/data_* -maxdepth 3 -type d -name "main*" 2> /dev/null /opt/data_025/maindblogs /opt/data_026/maindblogs /opt/data_027/maindblogs /opt/data_028/maindblogs $ find /opt/data_* -maxdepth 3 -type d -name "rvlogs*" 2> /dev/null /opt/data_002/prod/rvlogs2_archive... (4 Replies)
Discussion started by: urello
4 Replies

7. Shell Programming and Scripting

Find file of particular pattern

Hi All, I have a file PSU_ 20130805_201308041234522 i want to search this file where variable day=20130805 and curday=20130804 after currday date some numbers will be added.how to search this file by using day and curday. Thanks in advance. (3 Replies)
Discussion started by: pracheth
3 Replies

8. Shell Programming and Scripting

How to find a file with a specific pattern for current sysdate & upon find email the details?

I need assistance with following requirement, I am new to Unix. I want to do the following task but stuck with file creation date(sysdate) Following is the requirement I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Discussion started by: PreetArul
4 Replies

9. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
platform::shell(3tcl)					       Tcl Bundled Packages					     platform::shell(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(3tcl)
All times are GMT -4. The time now is 06:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy