Hi guys,
I have one file with duplicate string. I want to replace all the occurance of that string with some other string.
How can I do that in vi editor?
Malay Maru (3 Replies)
Hi All,
As I'm working on a Unix script...
and the requirement is like, I need to search a word and replace it with the another word...
for that i'm using SED command....
can anybody give any other alternate for this...?
Thanks
Amit (2 Replies)
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Hi
I have to search & replace column in the file.For example ..below iam having File1. in which 3rd column ...if it is A it should be 'ACT' if P it should be 'PAD' and if it ils D it should be 'DEC'
I have to pass column no ,value and to be converted value as variables in to the... (2 Replies)
I want to write a shell script which traverses a cpp file.
Suppose there is function fncn_name6 .. which is called by fncn_name5
which in turn called by fncn_name4 and so on .. in a single cpp class.
ie
fncn_name1
{
fncn_name2
{
fncn_name3
}
{
fncn_name4
... (0 Replies)
I have a file (say file1.txt) and I have to search for a line which has a text replace it and replace another string too in the same line.
Eg:
file1.txt
--------
x='hai' y='world' z='unix'
x='hai'
y='world'
x='hai' z='perl' y='world' z="world" k="junk" b="world"
z='perl' x='hai'... (3 Replies)
Hi Friends.
Please have a look at dummy file. I need to extract from this file:
1. Counts of event=
2. the 2nd coulmn is unique call id of this transaction. Based on that, i have to search for txstatus= .
Note: Values of event, calltype and txstatus can be anything.
I want to print... (1 Reply)
Hi all,
The operating system is Solaris 10
I have example line here below I need to change the stat1 to stat2 using a shell script. search for space(" ") and replace with "\ "
Stat1 --- /data/Sat Night Stay.txt
Stat2 --- /data/Sat\ Night\ Stay.txt
Thanks
Firestar. (1 Reply)
Hi,
more data.txt
more srstring.sh
input="data.txt"
while IFS= read -r var
do
startdirectory=$loc
search=$(echo $var | awk -F'=' '{print $1}')
replace=$(echo $var | awk -F'=' '{print $2}')
find "/tmp/config" -type f -exec grep -l "$search" {} + |
while read file
do if sed -e... (9 Replies)
hi All
i'm new to shell/bash scripting and need help to write a script.
question: i have a file of 100's of line, i need to replace all zeros in that file with its respective position, starting from 0 to 23 and remove the remaining
sample file is like.
Enter the date in the format... (12 Replies)
Discussion started by: sunnu2u86
12 Replies
LEARN ABOUT DEBIAN
layout::manager::compass
Layout::Manager::Compass(3pm) User Contributed Perl Documentation Layout::Manager::Compass(3pm)NAME
Layout::Manager::Compass - Compass based layout
DESCRIPTION
Layout::Manager::Compass is a layout manager that takes hints based on the four cardinal directions (north, east, south and west) plus a
center area that takes up all remaining space (vertically).
In other words, the center area will expand to take up all space that is NOT used by components placed at the edges. Components at the
north and south edges will take up the full width of the container.
+--------------------------------+
| north |
+-----+--------------------+-----+
| | | |
| w | | e |
| e | center | a |
| s | | s |
| t | | t |
| | | |
+-----+--------------------+-----+
| south |
+--------------------------------+
Components are placed in the order they are added. If two items are added to the 'north' position then the first item will be rendered
above the second. The height of the north edge will equal the height of both components combined.
Items in the center split the available space, heightwise. Two center components will each take up 50% of the available height and 100% of
the available width.
Compass is basically an implementation of Java's BorderLayout <http://java.sun.com/docs/books/tutorial/uiswing/layout/border.html>
SYNOPSIS
$cont->add_component($comp1, 'north');
$cont->add_component($comp2, 'east');
my $lm = Layout::Manager::Compass->new;
$lm->do_layout($cont);
POSITIONING
When you add a component with add_component the second argument should be one of: north, south, east, west or center. Case doesn't matter.
You can also just provide the first letter of the word and it will do the same thing.
METHODS
do_layout
Size and position the components in this layout.
AUTHOR
Cory Watson, "<gphat@cpan.org>"
COPYRIGHT & LICENSE
Copyright 2008 - 2010 Cory G Watson
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.3 2011-05-16 Layout::Manager::Compass(3pm)