i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Hi,
I want to replace the srting '; with ABCD'; in a file from line 1 to line 65. Is there any single command to do it without using awk
Thanks for quick reply
https://www.unix.com/images/misc/progress.gif (3 Replies)
To trim 3rd field in for all the lines of a file and replace the modified string in that particular field.
For example i have a file called Temp.txt having content
Temp.txt
-----------------
100,234,M1234
400,234,K1734
300,345,T3456
----------------
So the modified file output should... (4 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi
I am not the best scripter in the world and have run into a issue which you might be able to guide me on...
I have two files.
File1 :
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
File2:
C345,... (5 Replies)
Hi experts,
In my text file I have the following alot of lines like below.
input.k is as follows.
2684717 -194.7050476 64.2345581 150.6500092 0 0
2684718 -213.1575623 62.7032242 150.6500092 0 0
*INCLUDE
$# filename... (3 Replies)
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
I don't know if it's been asked before but seems i gave up seeking.
i have 2 files :
file1.txt
Monday XXXX
Tuesday XXXX
XXXX Wednesday
Thursday XXXX
XXXX is in every lines of file1.txt and i want to replace them with each line in file2.txt:
home
school
cinema
so output file is:
... (19 Replies)
HI
Can any one guide me how to achieve this task. I have 2 files
env.txt
#Configuration.Properties values
identity_server_url = http://identity.test-hit.com:9783/identity/service/user/register
randon_password_length = 6
attachment_file_path = /pass/temp/attachments/... (1 Reply)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT DEBIAN
locale::msgcat
Msgcat(3pm) User Contributed Perl Documentation Msgcat(3pm)NAME
Locale::Msgcat - Perl extension for blah blah blah
SYNOPSIS
use Locale::Msgcat;
$cat = new Locale::Msgcat;
$rc = $cat->catopen(name, oflag);
$msg = $cat->catgets(set_number, message_number, string);
$rc = $cat->catclose();
DESCRIPTION
The Locale::Msgcat module allows access to the message catalog functions which are available on some systems. A new Locale::Msgcat object
must first be created for each catalog which has to be open at a given time.
The catopen operation opens the catalog whose name is given as argument. The oflag can be either 0 or NL_CAT_LOCALE (usually 1) which is
the recommended value.
The catgets message retrieves message_number for the set_number message set, and if not found returns string.
The catclose function should be used when access to a catalog is not needed anymore.
EXAMPLES
use Locale::Msgcat;
$cat = new Locale::Msgcat;
unless ($cat->catopen("whois.cat", 1)) {
print STDERR "Can't open whois catalog.
";
exit(1);
}
printf "First message, first set : %s
", $cat->catgets(1, 1, "not found");
unless ($cat->catclose()) {
print STDERR "Can't close whois catalog.
";
exit(1);
}
The above example would print the first message from the first message set found in the whois catalog, or if not found it would print "not
found".
AUTHOR
Christophe Wolfhugel, wolf@pasteur.fr
SEE ALSO catopen(3), catclose(3), catgets(3), perl(1).
perl v5.14.2 1999-11-15 Msgcat(3pm)