First off, could you PLEASE stay away from the text formatting!
Sorry for that - it was unintentionally. I pasted a text from word processor - my mistake. The original post was already corrected.
Quote:
Originally Posted by bakunin
In this case the interpretable command would be "pattern1=abc" and "def" and "geh" would be treated as (indecipherable) other commands, which perhaps leads to some error message, in addition to "pattern1" not having the value you expect it to have.
That exactly what was happening.
Quote:
Originally Posted by bakunin
Quote:
Originally Posted by RudiC
Little to add to bakunin's explanations, except for the data source to read from: redirect input of the entire loop to your file.csv:... done < file.csv
In the end, thanks everyone for help. Specially bakunin & RudiC - the script seems to work perfect now. Great
Regards,
gordom
Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks
sample file:... (2 Replies)
Hi,
Im trying to update some properties files with text from another file:
file1
user=xyz
file2
user=
after script
file2
user=xyz
Im using this reading the $QUARTZURL,ETC... from quartz.properties:
echo... (1 Reply)
Hi everyone.
Could u be so kind and help me with on "simple" shell script?
1. i need to search a file line by line for a pattern.
example of a lines in that file
2947 domain = feD,id = 00 0A 02 48 17 1E 1D 39 DE 00 0E 00,Name
Values:snNo = f10
Add AttFlag = 0
2. i need to find... (0 Replies)
All
I have a very large file (aproximately 150,000) as shown below separated by pipe "|". I need to replace data in 2, 16, 17, 23 fields that are of time stamp format. My goal is to look in those fields and it ends with "000000|" then replace it with "000|". In other words, make it as 6 digit... (2 Replies)
I need to grep for a pattern in a file. Files are huge and have several repeated occurances of the strings which match pattern. I just need the strings which contain the pattern in the output.
For eg.
The contents of my file are as follows. The pattern I want to match by is ABCD
... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
What command would rename "sequentialInsert", in
~cs252/Assignments/commandsAsst/project/arrayops.h, to... (2 Replies)
Hello all,
This is my first post and I hope you can help me out.
I searched for quite some hours now and haven't found a simple solution to my problem.
It is as following:
I got this file:
dl.dropbox.com/u/14586156/stuff/Bookmarks.plist
and want to replace the Text between... (9 Replies)
Well, to make another post at this helpful forum :b::D:
I recently tried something like this, I want to replace all those numberings/letters that are located
between <string>file://localhost/var/mobile/Applications/ and /Documents/</string>
numberings =----
replace with:
first... (6 Replies)
Hi,
We have a file (e.g. a .csv file, but could be any other format), with 2 columns: the old value and the new value. We need to modify all the files within the current directory (including subdirectories), so find and replace the contents found in the first column within the file, with the... (9 Replies)
how to display the unique strings in two files using shell script or commands.
I tried diff and cmp but it shows the entire line, i need only the mismatched strings.
File1:
sat,sun,mon,tue
rose,lilly,lotus
white,red,blue,green,pink
File2:
sat,sun,mon,tue
rose,sunflower,lotus... (4 Replies)
Discussion started by: Arun_Linux
4 Replies
LEARN ABOUT LINUX
ppmtopgm
ppmtopgm(1) General Commands Manual ppmtopgm(1)NAME
ppmtopgm - convert a portable pixmap into a portable graymap
SYNOPSIS
ppmtopgm [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces a portable graymap as output. The output is a "black and white" rendering of the original
image, as in a black and white photograph. The quantization formula used is .299 r + .587 g + .114 b.
Note that although there is a pgmtoppm program, it is not necessary for simple conversions from pgm to ppm , because any ppm program can
read pgm (and pbm ) files automatically. pgmtoppm is for colorizing a pgm file. Also, see ppmtorgb3 for a different way of converting
color to gray. And ppmdist generates a grayscale image from a color image, but in a way that makes it easy to differentiate the original
colors, not necessarily a way that looks like a black and white photograph.
QUOTE
Cold-hearted orb that rules the night
Removes the colors from our sight
Red is gray, and yellow white
But we decide which is right
And which is a quantization error.
SEE ALSO pgmtoppm(1),ppmtorgb3(1),rgb3toppm(1),ppmdist(1),ppm(5),pgm(5)AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
10 April 2000 ppmtopgm(1)