Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: som.nitk
1,443
Posted By som.nitk
Joining broken lines with awk or perl
Hi,
I have a huge file with sql broken statements like:



PP3697HB @@@@0
<<<<<<Record has been deleted as per PP3697HB>>>>>>
FROM sys.xtab_ref rc,sys.xtab_sys f,sys.domp ur WHE
RE rc.milf...
2,872
Posted By som.nitk
:) :)
:) :)
2,872
Posted By som.nitk
If it contains alphanumeric with space like: ...
If it contains alphanumeric with space like:


1^~^GH^~^23 Banergatta^~^Bangalore 560001^~^India^~^MISS B DAS^~^
2,872
Posted By som.nitk
Why does it not match any alphanumeric characters...
Why does it not match any alphanumeric characters with following?


if ($var =~ /^((?:[a-zA-Z0-9]*\^~\^){2})(.*)/) {
$string1 = $1;
$string2 = $2;
}
2,872
Posted By som.nitk
I want the code in perl and want to split the...
I want the code in perl and want to split the string and store in two variables as I said above.
The separator will be '^~^'
Please refer to my first post.
2,872
Posted By som.nitk
split string using sed, perl
How can I split following input into stwo strings:

Input:


1^~^2^~^3^~^4^~^5^~^6^~^7^~^8^~^9


Output:


$string1 = 1^~^2^~^
$string2 = 3^~^4^~^5^~^6^~^7^~^8^~^9


Note: the...
1,146
Posted By som.nitk
Thanks! I will try them and get back.
Thanks! I will try them and get back.
1,146
Posted By som.nitk
This is not a one liner problem to be solved with...
This is not a one liner problem to be solved with sed.
I am coding with perl and want some perl code preferably substitution.
1,146
Posted By som.nitk
Appreciate the response. Can't it be done via...
Appreciate the response.
Can't it be done via normal regex substitution?

I am saying this because the actual string which I will substitute is not so simple but complex and I cannot simply join...
1,146
Posted By som.nitk
Like I said I am doing it in perl code. It also...
Like I said I am doing it in perl code. It also has the substitution feature.
Can you write the search pattern. It needs to be generic in nature meaning it should replace the 54th occurance while...
1,146
Posted By som.nitk
Inserting into long delimited string using perl.
Hi,

I have a very long pipe delimited string. The length of the string could vary. For example:


START|one|two|three|four|five|six|seven
START|one|two|three|four|five|six|seven|eight|nine...
877
Posted By som.nitk
Perl: accessing reference to variable inside hash.
Below is hash which contains reference to variables:

my %mandatoryFields = (
1 => \$msgtype,
2 => \$switchtype,
3 => \$card_nbr,
...
732
Posted By som.nitk
Perl Hash access
Suppose I have a hash:


my %table1 = (
'Sam' => {
'Company' => 'XYZ',
'Post' =>...
1,300
Posted By som.nitk
Thanks Scrutinizer. Could you please explain the...
Thanks Scrutinizer. Could you please explain the logic behind it how it works?
1,300
Posted By som.nitk
Dosent seem to work with the following: ...
Dosent seem to work with the following:


$ echo "60000005,MAT CON DEPT-DB,,1,N" | perl -plne 's/([^,]+(,[^,]+){3}).*$/$1/'
60000005,MAT CON DEPT-DB,,1,N
2,972
Posted By som.nitk
Sorry, but my intention was different. Say I...
Sorry, but my intention was different.
Say I have several putty windows opened. Now I want that when I connect to production database , then the font color changes to red.
Now I can write an alias...
2,972
Posted By som.nitk
alias setting
I want to set an alias to connect to sqlplus and also run a command while it it logs in.
How can I do that?
1,300
Posted By som.nitk
Perl formatting.
I have a file which has following data:



And I want the following out of it:



So basically I want only the first four command separated fields and strip off the rest. How do I do it...
1,701
Posted By som.nitk
Logging perl and shell debug mode.
I have a shell program which calls a perl program.
I am running the shell program with command;


$ ksh -x <prog_name>


Inside the shell program, I am calling perl with warnings.

I...
5,906
Posted By som.nitk
Set it in your .profile alias...
Set it in your .profile

alias m='/path/to/script'

Logout and login again to permanently set it in your environment.
890
Posted By som.nitk
problem is "sed"
Hi,
I want the following string to be printed :

7.5.aa.sss.dddd out of 7.5.aa.sss.dddd_ROLD

my sed string is:

echo "7.5.aa.sss.dddd_ROLD" | sed -n...
3,798
Posted By som.nitk
Display a menu on bottom right of screen
Hi,
I have a menu of around 10 lines with options.
I want to display it in bottom right corner of screen for better display.


I can do it with clear screen. But I don't want to use it, because...
2,127
Posted By som.nitk
sed not working in perl script
Hi,
I have a comfig file as follows:


[Dummy1]
Sun 0000-2359
Mon 0000-0859;1830-2359
Tue 0000-2359;1830-2359
Wed 0000-2359;1830-2359
Thu 0000-2359;1830-2359
Fri ...
7,199
Posted By som.nitk
Hi, Thanks for your reply but I did not...
Hi,
Thanks for your reply but I did not understand how the script will work.
Can you please explain?
7,199
Posted By som.nitk
sed command in perl script
What is wrong with this line in a perl script?


$amc_data = `sed -n '/\/,/\[\/Amc\]/p' "$config_file"`


I ran the above from command line and it works fine from unix command prompt.
The...
Showing results 1 to 25 of 50

 

Featured Tech Videos

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