10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I want to implement something like this:
if( keyword1 exists)
then
check if(keyword2 exists in the same line)
then replace keyword 2 with New_Keyword
else
Add New_Keyword at the end of line
end if
eg:
Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies
2. Shell Programming and Scripting
Hi Perl users,
I have another problem with text processing in Perl. I have a file below:
Linux Unix Linux Windows SUN
MACOS SUN SUN HP-AUX
I want the result below:
Unix Windows SUN
MACOS HP-AUX
so the duplicate string will be removed and also the keyword of the string on... (2 Replies)
Discussion started by: askari
2 Replies
3. Shell Programming and Scripting
Dear All,
How to remove. (dot) if found in the beginning of file name while doing wget (download)?
I am facing problem while re-sizing the image by using ImageMagick. Two dots in the file name are causing problem. ImageMagick is skipping such image with a dot . in the beginning, like
... (1 Reply)
Discussion started by: Praveen Pandit
1 Replies
4. Shell Programming and Scripting
HI,
Can anyone help me with a script.
i/p
calc 1 2 3 4 5 6 7 8
calc 4 5 6 calc 7 8 9
o/p
calc 1 2 3 4 5 6 7 8
calc 4 5 6
i.e remove anything after where two times the string calc is found.
thanks (3 Replies)
Discussion started by: Indra2011
3 Replies
5. Shell Programming and Scripting
Hi,
here's the problem:
text="hello1 hello2
world
earth mars jupiter
planet"how do I print the text until it finds the keyword "mars" so that the desired output is
output="hello1 hello2
world
earth"
I have rtfm of sed and I think the problem is, that if I find the word "mars" it will... (7 Replies)
Discussion started by: icantfindauser
7 Replies
6. Shell Programming and Scripting
I have a site where over 1000+ files were injected with code.
<?php
lots of garbage
?><GOOD HTML or PHP>
everything before the < is the injected code
i.e., the injected code is:
<?php
lots of garbage
?>
How do I:
1. check that there is in fact an injection (so I don't... (4 Replies)
Discussion started by: vanessafan99
4 Replies
7. Shell Programming and Scripting
Hello Everyone,
i need to read specific number of lines ( always serialized ; i.e from 10 to 20 or from 34 to 44 ) in a file , where the first line is found by grep 'ing a keyword.
example
file.txt
------------------------------------------------------------------
--header
this is the... (7 Replies)
Discussion started by: alain.kazan
7 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have a file with ';' delimeter which has some new line characters. How can I delete the new line characters if they are found between 1 to 10 fields.
Thanks (3 Replies)
Discussion started by: rudoraj
3 Replies
9. UNIX for Dummies Questions & Answers
I have a '~' delimited file of 6 - 7 million rows. Each row should contain 13 columns delimited by 12 ~'s. Where there are 13 tildes, the row needs to be removed. Each row contains alphanumeric data and occasionally a ~ ends up in a descriptive field and therefore acts as a delimiter, resulting in... (1 Reply)
Discussion started by: kpd
1 Replies
10. Solaris
Unable to log into solaris 8 CDE as a particular user. The errors are:
dtsession: Unable to start message server - exiting.
dtwm: Invalid keyword -- /TITLE
root can log in successfully.
I'm guessing that it's trying to run dtwm with an invalid option. Howcan I correct this? (1 Reply)
Discussion started by: lyonsd
1 Replies