Search Results

Search: Posts Made By: ocelot
3,210
Posted By ocelot
fantastic. thanks very much! ocelot
fantastic.

thanks very much!

ocelot
3,210
Posted By ocelot
Hi, Just one more query on this... How...
Hi,

Just one more query on this...

How can I get the name of the file, eg file.txt appended to the beginning of every line too? eg to get:

file.txt,HELLO,SIMPLE=HELLO...
3,210
Posted By ocelot
thats worked perfectly...! thanks a lot for...
thats worked perfectly...!

thanks a lot for your help!

ocelot
3,210
Posted By ocelot
I think I know why...its because I have another...
I think I know why...its because I have another variable called SIMPLE_SET_ID.

Question - how can the awk statement be changed to search on just "SIMPLE" only? I tried putting % around SIMPLE but...
3,210
Posted By ocelot
Hi zaxxon, thanks for the reply. The...
Hi zaxxon,

thanks for the reply. The solution kinda works...but only for the first 9 lines. It then appends the rest of the file with "false" or "true", e.g.

HELLO,SIMPLE=HELLO...
3,210
Posted By ocelot
ksh - adding a dynamic value to the front of a line
Hi Forum,

Im trying to write some code to read a file, take a certain dynamic value and write it back to the file at the front of every line.

For example, file.txt is:

SIMPLE=HELLO...
40,721
Posted By ocelot
uuencode/mailx
Hi all,

I know how to use the uuencode/mailx commands to mail a single file within a directory, e.g.

uuencode file.dat file.dat | mailx joe.smith@mail.com

but now, i need to be able to mail...
2,810
Posted By ocelot
mailx every file in directory
Hi all,

I know how to use the uuencode/mailx commands to mail a single file within a directory, e.g.

uuencode file.dat file.dat | mailx joe.smith@mail.com

but now, i need to be able to mail...
5,947
Posted By ocelot
mailx every file in directory
Hi all,

I know how to use the uuencode/mailx commands to mail a single file within a directory, e.g.

uuencode file.dat file.dat | mailx joe.smith@mail.com

but now, i need to be able to mail...
8,908
Posted By ocelot
Hi, I removed the wc -l as well. That too...
Hi,

I removed the wc -l as well. That too didnt work and the result kept on dumping out again...

note: The double quotes i have used are correct in this instance, as this is how a UNIX command...
8,908
Posted By ocelot
I have tried grep -c but that doesnt work either,...
I have tried grep -c but that doesnt work either, it keeps on dumping out.

The script is actually a TCL script with embedded UNIX commands. The part its failing on is like so:

set td [exec grep...
8,908
Posted By ocelot
grep to handle a 0 result
Hi guys,

I have the following grep command in a script to search through a file for a string and return its count, and it works fine for when the string exists:

grep "string" file.txt | wc
...
4,103
Posted By ocelot
thanks that one works. :)
thanks that one works.

:)
4,103
Posted By ocelot
thanks anbu23. but i keep getting this error? : ...
thanks anbu23. but i keep getting this error? :

Unmatched "
4,103
Posted By ocelot
just out of interest, how would i get it down to...
just out of interest, how would i get it down to just the number? i.e. to just:

3661208

thanks

ocelot
4,103
Posted By ocelot
thanks anbu23 you saved my life! :)
thanks anbu23 you saved my life! :)
4,103
Posted By ocelot
i tried sort -u but it only removed one of the...
i tried sort -u but it only removed one of the lines. I ended up with this:

35,36d34
< DATA[0].EVENT[0].EVENT_ID.s = "3661208"

but i am trying to just get this:

DATA[0].EVENT[0].EVENT_ID.s...
4,103
Posted By ocelot
I will always need the line AND the number in the...
I will always need the line AND the number in the quotes, i.e.

DATA[0].EVENT[0].EVENT_ID.s = "3661208"

the number here is always different. But i need it along with the rest of the line
4,103
Posted By ocelot
removing line and duplicate line
Hi,

I have 3 lines in a text file that is similar to this (as a result of a diff between 2 files):

35,36d34
< DATA[0].EVENT[0].EVENT_ID.s = "3661208"
< DATA[0].EVENT[0].EVENT_ID.s =...
20,222
Posted By ocelot
thanks guys that worked a treat! :)
thanks guys that worked a treat! :)
20,222
Posted By ocelot
removing duplicate lines from a file
Hi,

I am trying to remove duplicate lines from a file. For example the contents of example.txt is:

this is a test
2342
this is a test
34343
this is a test
43434

and i want to remove the...
2,822
Posted By ocelot
anbu23: i cant get that bit of code to run,...
anbu23:

i cant get that bit of code to run, are you sure thats correct? Also by "/THIS/" are you referring to the search string?

thanks
2,822
Posted By ocelot
search for word and next 30 lines then put in file
Hi,

I am trying to search through a file for a particular word, then once found, I want the search to carry on for another 30 lines and append all this to a new file. For example, I search for the...
2,822
Posted By ocelot
searching for a pattern in a file and forwarding result to another
Hi,

I am trying to search through a file for a particular word, then once found, I want the search to carry on for another 30 lines and append all this to a new file. For example, I search for the...
10,800
Posted By ocelot
german characters (e.g. ä, ß, Ö)
Hi Guys,

I am working with a system whereby messages are being transferred into a UNIX box (which contain these german characters) and the message needs to be read by a script. But the box doesnt...
Showing results 1 to 25 of 31

 
All times are GMT -4. The time now is 09:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy