How to delete last occurence of word using Linux command?
Hi all,
I am trying to delete last occurrence of word using sed command.
for example.
I have input like this
and I am expecting output like this
I just need to delete last occurrence of "and" from the last line only.
Thanks
Last edited by Scott; 02-24-2013 at 01:51 PM..
Reason: Code tags
I want to count the number of occurence of perticular word from one text file.
Please tell me "less" command is work in ksh or not. If it is not working then instead of that which command will work. :confused: (40 Replies)
i have a file called file1
cat file1
i am namish
namish lives in India
India and namish both are good.
I want to delete all the occurences of namish in one shot,if i do it with sed i guess all the lines will be deleted containing the pattern.Suggest me any idea without AWK.
Thanks... (6 Replies)
Greetings,
I need to search and count all the occurences of a word in all the files in a directory.
Any suggestions greatly appreciated.
Thanks (1 Reply)
In a file I have to count a particular word. like i need apache how many times.
I tried this
$ tr "\011" "\012\012"<foo1 | tr -cd "" |sort\uniq -c
but I got result like this
32 apache
18 dns
12 doctor
Please sugest me (4 Replies)
I have an array as follows:
Space: ABC
Name: def
Age: 22
Type: new
Name: fgh
Age: 34
Type: old
Space: XYZ
Name: pqr
Age: 44
Type: new
:
:
How can I separate the array with elements starting from Space:ABC until Space: XYZ & put them in a different array & so on... (4 Replies)
Hello,
I have several files in a specific directory.
A specific string in one file can occur in another files.
If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string.
Example.
file1
ShortName "Blue... (2 Replies)
example:
i have the following text file...
i am very tired.
i am busy
i am hungry
i have to find the number of occurence of a particular word 'am' from the text file.. can any one give the shell script for it (34 Replies)
can anyone tell me what is the commands to delete the below particular word in the all files located in one particular file path
files/ll>grep "/ftp/" test.kell
ftp -m uskmc -d /ftp/ -i filename.zip
output should be :
ftp -m uskmc -d -i filename.zip (4 Replies)
Discussion started by: ramkumar15
4 Replies
LEARN ABOUT SUSE
uuid
uuid(n) uuid uuid(n)
__________________________________________________________________________________________________________________________________________________NAME
uuid - UUID generation and comparison
SYNOPSIS
package require Tcl 8.2
package require uuid ?1.0.1?
::uuid::uuid generate
::uuid::uuid equal id1 id2
_________________________________________________________________DESCRIPTION
This package provides a generator of universally unique identifiers (UUID) also known as globally unique identifiers (GUID). This implemen-
tation follows the draft specification from (1) although this is actually an expired draft document.
COMMANDS
::uuid::uuid generate
Creates a type 4 uuid by MD5 hashing a number of bits of variant data including the time and hostname. Returns the string represen-
tation of the new uuid.
::uuid::uuid equal id1 id2
Compares two uuids and returns true if both arguments are the same uuid.
EXAMPLES
% uuid::uuid generate
b12dc22c-5c36-41d2-57da-e29d0ef5839c
REFERENCES
[1] Paul J. Leach, "UUIDs and GUIDs", February 1998. (http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt)
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category uuid of
the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
GUID, UUID
COPYRIGHT
Copyright (c) 2004, Pat Thoyts <patthoyts@users.sourceforge.net>
uuid 1.0.1 uuid(n)