Thanks for all your suggestions, but I am failing to full fill the requirements.
XML data is in a file and modified data should be updated to same file. only data having ">#!...<" needs to be changed if Element1, Element2 and user are available previous line. please find the original and output below:
Can some please help me to break this, thanks in advance.
Hello All
I would like to search for files containing certain string pattern under all the directories under /vobs/vobname and print the output to a file in my home directory. How can I do this?
Note: /vobs/vobname conatins several directories.
Thank You in advance
newbetounix (1 Reply)
hi guys,
insert into /*<new>*/abc_db.tbl_name
this is should be replaced to
insert into /*<new>*/${new}.tbl_name
it should use '.' as delimiter and replace
is there any way to do it using sed (6 Replies)
I have data this data in a text file
1 PSE480 (P)
2 PSE600 (P)
3 (P) PSE600
4 (P) PSE720
5 PSE600 (P)
6 PSE720 (P)
7 x12(P)PSE360
8 PSE450 (P)
9 PSE540 (P)
10 PSE720 (P)
11 (P) PSE1440
12 24sPSE720 (P)
What i want id the last 3 (or 4 in one case) characters after PSE my final... (2 Replies)
Guys,
Here is the script that searches string from the set of similar files from the log directory, All the file patterns are defined as input file, from where the script should map to those files in the LOG_DIR and should start searching the strings from all those similar files.
... (1 Reply)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Problem Statement:-
I need to search a particular `String Pattern` in around `10000 files` and find the records which contains that `particular pattern`. I can use `grep` here, but it is taking lots of time.
Below is the command I am using to search a `particular string pattern` after... (3 Replies)
Hi,
I have a CSV with following type of data and would like to replace the timestamp information with 'null' string. Can you please suggest me on same?
8,1,'1','1',11,'2013-08-12 18:34:17.0','null',1,'2013-08-12 18:34:17.0','null','PROMOTIONAL','12','1','11','11',11,'0'
Thanks for your... (10 Replies)
Hi,
I'm trying to replace a string with sed, in a text file containing this pattern:
location alpha
value x
location beta
value y
location gamma
value y
location delta
value y
location theta
value z
...
What I want to achieve is:
Find location beta into text file... (1 Reply)
I have lines like:
table10 table_name_10 table10 table_name_10
table20 table_name_20 table20 table_name_20
table30 table_name_30 table30 table_name_30
I want to change the second "table_names" in all lines to test_table_name. Required output would be:
table10 table_name_10 table10... (19 Replies)
Hi I need help with writing a script to change a string in a file.
The script needs to read an input list (list.txt) file line by line searching for that string in a text.file. Once the string is found the last few words in the string should be replaced.
eg list.txt will contain
hello my... (6 Replies)
Discussion started by: sudobash
6 Replies
LEARN ABOUT MINIX
mined
Mined is a simple screen editor. At any instant, a window of 24lines is visible on the screen. The current position in the fileis shown by the cursor. Ordinary characters typed in are insert-ed at the cursor. Control characters and keys on the numerickeypad (at the right-hand side of the keyboard) are used to move
the cursor and perform other functions. Commands exist to moveforward and backward a word, and delete words either in front ofthe cursor or behind it. A word in this context is a sequence ofcharacters delimited on both ends by white space (space, tab,line feed, start of file, or end of file). The commands fordeleting characters and words also work on line feeds, making itpossible to join two consecutive lines by deleting the line feedbetween them. The editor maintains one save buffer (not dis-
played). Commands are present to move text from the file to thebuffer, from the buffer to the file, and to write the buffer ontoa new file. If the edited text cannot be written out due to a
full disk, it may still be possible to copy the whole text to thesave buffer and then write it to a different file on a different
disk with CTRL-Q. It may also be possible to escape from the ed-itor with CTRL-S and remove some files. Some of the commands
prompt for arguments (file names, search patterns, etc.). All
commands that might result in loss of the file being editedprompt to ask for confirmation. A key (command or ordinary char-acter) can be repeated times by typing where is the escape key.Forward and backward searching requires a regular expression asthe search pattern. Regular expressions follow the same rules asin the editor, These rules can be stated as: Any displayable
character matches itself. . (period) matches any character ex-cept line feed. ^ (circumflex) matches the start of the line. $
(dollar sign) matches the end of the line. c matches the char-
acter c (including period, circumflex, etc). [string] matches
any of the characters in the string. [^string] matches any of
the characters except those in the string. [x-y] matches any
characters between x and y (e.g., [a-z]). Pattern* matches any
number of occurrences of pattern. Some examples of regular ex-
pressions are:
The boy matches the string The boy
^$ matches any empty line.
^.$ matches any line containing exactly 1 character
^A.*.$ matches any line starting with an A, ending with a
period.
^[A-Z]*$ matches any line containing only capital letters (or
empty).
[A-Z0-9] matches any line containing either a capital letter
or a digit.
.*X$ matches any line ending in X
A.*B matches any line containing an A and then a B
Control characters cannot be entered into a file simply by typingthem because all of them are editor commands. To enter a controlcharacter, depress the ALT key, and then while holding it down,hit the ESC key. Release both ALT and ESC and type the controlcharacter. Control characters are displayed in reverse video.The commands are as follows.CURSOR MOTION
arrows Move the cursor in the indicated direction
CTRL-A Move cursor to start of current line
CTRL-Z Move cursor to end of current line
CTRL-^ Move cursor to top of screen
CTRL-_ Move cursor to end of screen
CTRL-F Move cursor forward to start of next word
CTRL-B Move cursor backward to start of previous word
SCREEN MOTION
Home key Move to first character of the file
End key Move to last character of the file
PgUp key Scroll window up 23 lines (closer to start of the
file)
PgDn key Scroll window down 23 lines (closer to end of the
file)
CTRL-U Scroll window up 1 line
CTRL-D Scroll window down 1 line
MODIFYING TEXT
Del key Delete the character under the cursor
Backspace Delete the character to left of the cursor
CTRL-N Delete the next word
CTRL-P Delete the previous word
CTRL-T Delete tail of line (all characters from cursor to
end of line)
CTRL-O Open up the line (insert line feed and back up)
CTRL-G Get and insert a file at the cursor position
BUFFER OPERATIONS
CTRL-@ Set mark at current position for use with CTRL-C and
CTRL-K
CTRL-C Copy the text between the mark and the cursor into
the buffer
CTRL-K Delete text between mark and cursor; also copy it to
the buffer
CTRL-Y Yank contents of the buffer out and insert it at the
cursor
CTRL-Q Write the contents of the buffer onto a file
MISCELLANEOUS
numeric + Search forward (prompts for regular expression)
numeric - Search backward (prompts for regular expression)
numeric 5 Display the file status
CTRL-] Go to specific line
CTRL-R Global replace pattern with string (from cursor to
end)
CTRL-L Line replace pattern with string
CTRL-W Write the edited file back to the disk
CTRL-X Exit the editor
CTRL-S Fork off a shell (use CTRL-D to get back to the edi-
tor)
CTRL- Abort whatever the editor was doing and wait for com-
mand
CTRL-E Erase screen and redraw it
CTRL-V Visit (edit) a new file
Mined was designed by Andy Tanenbaum and written by Michiel Huis-jes.