Search Results

Search: Posts Made By: cillmor
2,082
Posted By cillmor
find and Replace String in Perl - Regexp
Trying to find and replace one string with another string in a file


#!/usr/bin/perl

$csd_table_path = "/file.ntab";
$find_str = '--bundle_type=021';
$repl_str = '--bundle_type=021...
6,116
Posted By cillmor
Thanks Franklin, awk works as expected. Rudi I'm...
Thanks Franklin, awk works as expected. Rudi I'm running off Mac OS X 10.8 so see version different. Thanks again
6,116
Posted By cillmor
Thanks for the reply Rudi but your suggestion...
Thanks for the reply Rudi but your suggestion returns an errorsed: 1: "/2Z694-00609/,$ {1,1 s/ ...": bad flag in substitute command: '}'

Below is the file and I'm trying to strip out the first and...
6,116
Posted By cillmor
Remove the first match only in a file using sed
I'm trying to remove the first match only of 2Z694 from an xml file and replace with a blank

File Example:
</Phoenix_Response_Data>
<Bundle_Name_Primary>2Z694</Bundle_Name_Primary>...
5,732
Posted By cillmor
Thanks MacMonster, escape did the trick
Thanks MacMonster, escape did the trick
5,732
Posted By cillmor
Check if string starts with $ symbol
How do I check that a string $AA22CC3 starts with the "$" symbol ?

I have tried :


checksum='$AAB3E45'
echo $checksum


case $checksum in
$* ) echo success ;
esac



Thanks ...
31,581
Posted By cillmor
Compare current time to timestamp on a file
I'm trying to compare 2 dates between current time and the timestamp on a file.
The date format is mmdd
Both return Apr 1 but when using if statement

line 11: Apr 1: command not found error is...
12,168
Posted By cillmor
I got it working as expected. Thanks alot radoulov
I got it working as expected. Thanks alot radoulov
12,168
Posted By cillmor
Script runs without error, mail is sent but the...
Script runs without error, mail is sent but the body is blank.
The log file is not empty, it just contains "This is email text".

If I run it under shell, for example:

#!/bin/sh
mail -s...
12,168
Posted By cillmor
Tried both but body of the mail is blank. my...
Tried both but body of the mail is blank.

my $log_file = '/message.txt'; # are you sure it's /message
# and not ./message?

/message.txt is the location of the...
12,168
Posted By cillmor
Mail the contents of a file in perl
Hi,

I'm trying to read the contents of a file (message.txt), put them in a mail and then mail it
This is what I have thus far but I having trouble referencing the file. I'm trying to put it into...
5,359
Posted By cillmor
methyl, thanks, that seems to have the desired...
methyl, thanks, that seems to have the desired effect.
At least I'm not getting the sed: 1 "s/ \n/g\n": unterminated substitute pattern error
5,359
Posted By cillmor
Delete trailing white space
I have a string "disk0 with a trailing white space after it" but I want to get rid of this white space from right to left so that I am left with "disk0" only.

Using sed 's/ $//g' doesn't seem to...
1,928
Posted By cillmor
Thanks guys for all you help, much appreciated
Thanks guys for all you help, much appreciated
1,928
Posted By cillmor
Extract data from a string
Hi all,

I want to extract "this_data" from the string below using awk

<Bundle_Name>this_data</Bundle_Name>

Any help would be appreciated
Showing results 1 to 15 of 15

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