Sponsored Content
Top Forums Shell Programming and Scripting Find a file that contains a string Post 302664597 by Phuti on Saturday 30th of June 2012 02:17:16 AM
Old 06-30-2012
Thanks elixir_sinari for the help...


But am not yet sorted....


I struggling to find those files....


Please guys help...

---------- Post updated at 09:17 AM ---------- Previous update was at 09:07 AM ----------

Thanks again...

Let me try to re-phrase my requirement...

I have a list of files (file_1,file_2,...) that contains data in this format:

lets say I have file called file_1

cd X

cat file_1

96021702970839602170297083 ..... 12345689test

Now I want find any file that contains string '960217' starting from position 1 in the file and the string 'test' starting from position 184.

Sorry earlier I said position 183--my apology...

So I need any file that matches those requirements in a specified directory.

Thanks....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find a string in a file

What is wrong in this: One file in /tmp is test.txt...file has three rows as follows: YES I M HERE 12345 67890 Second file test2.txt: status = `grep -i "YES I M HERE" /tmp/test.txt` print "$status" if we execute test2.txt It is returning 'status' not found (4 Replies)
Discussion started by: yale_work
4 Replies

2. Shell Programming and Scripting

find a file according to string

Hi One to All iam new this site,i hopei will get some response for my question. My requirement is:i will pass a string(i.e Account number), it should search the corresponding log file in the path, after that it should copy the file in particular path, before that it should ask the path... (3 Replies)
Discussion started by: saic
3 Replies

3. Shell Programming and Scripting

How to find the string in file.

Hi All Iam new this forum, just i want know someting about the files: My req: i have file in that i want to search one string, if it is avaible then show the line ,otherwise it will show that the string is not available in the file, for this i am useing if then else with out - q... (1 Reply)
Discussion started by: psi
1 Replies

4. Shell Programming and Scripting

How to find a certain string in a file and replace it with a value from another file using sed/awk?

Hi Everyone, I am new to this forum and new to sed/awk programming too !! I need to find particular string in file1(text file) and replace it with a value from another text file(file2) the file2 has only one line and the value to be replaced with is in the second column. file 1: (assert (=... (21 Replies)
Discussion started by: paramad
21 Replies

5. Linux

Find String in FileName and move the String to new File if not found

Hi all, I have a question.. Here is my requirement..I have 500 files in a path say /a/b/c I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies

6. Shell Programming and Scripting

Find multiple string in one file using find command

Hi, I want find multiple string in one file using find coomand. And keeping it in one variable.grep is not working. (5 Replies)
Discussion started by: vivek1489
5 Replies

7. Shell Programming and Scripting

find string and replace with string in other file

Dear all, I need your help, I have file like this: file1:23456 01910964830098775635 34567 01942809546554654323 67589 26546854368698023653 09778 58716868568576876878 08675 86178546154065406546 08573 54165843543054354305 . .file2: 23456 25 34567 26 67589 27 (2 Replies)
Discussion started by: attila
2 Replies

8. Shell Programming and Scripting

Find string in file and append new string after

Hi All, I'm trying to insert a string into a file at a specific location. I'd like to add a string after the parent::__construct(); in my file. <?php if (! defined('BASEPATH')) exit('No direct script access allowed'); class MY_Controller extends CI_Controller { function... (6 Replies)
Discussion started by: jjkilpatrick
6 Replies

9. Shell Programming and Scripting

Find string in file and find the all records by string

Hello I would like to get know how to do this: I got a big file (about 1GB) and I need to find a string (for instance by grep ) and then find all records in this file based on a string. Thanks for advice. Martin (12 Replies)
Discussion started by: mape
12 Replies

10. Shell Programming and Scripting

Perl script to read string from file#1 and find/replace in file#2

Hello Forum. I have a file called abc.sed with the following commands; s/1/one/g s/2/two/g ... I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat sed -f abc.sed abc.dat >... (10 Replies)
Discussion started by: pchang
10 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy