Sponsored Content
Full Discussion: remove characters
Top Forums UNIX for Advanced & Expert Users remove characters Post 302266309 by Yogesh Sawant on Tuesday 9th of December 2008 11:59:04 PM
Old 12-10-2008
using Perl:
Code:
perl -pi -e 's/^\d+_\w+_//' file.txt

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to remove Characters before '~'

Hi, I am having a file which contains records as follows: DETAIL_KEY~12344|ACTIVE_PASSIVE~Y|AVG_SIZE_OF_RESPONSE~123123131 DETAIL_KEY~12344|ACTIVE_PASSIVE~Y|AVG_SIZE_OF_RESPONSE~123123131 DETAIL_KEY~12344|ACTIVE_PASSIVE~Y|AVG_SIZE_OF_RESPONSE~123123131... (4 Replies)
Discussion started by: Amey Joshi
4 Replies

2. Shell Programming and Scripting

remove space characters

hello I have this output ifspeed 100000000 ifspeed 100000000 collisions 413 collisions 10 duplex full duplex ... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

3. UNIX for Dummies Questions & Answers

remove characters from line

Hello, I have multiple lines in a file, each of which will have data that looks like this: xxxxxyyyyzzzz4abcdXYZXYZXYZ pqrstPQRST2cdPQRSTPQRST lmnopqr6abcdefgRST.3abc I want to be able to remove the number 4 + the following 4 characters (abcd) in the first line. For the second line,... (1 Reply)
Discussion started by: Gussifinknottle
1 Replies

4. Shell Programming and Scripting

remove last 4 characters from a string

I'm tring to remove the last 4 characters from strings in a file i.e. cat /tmp/test iwishicouldremovethis icouldremovethos so i would end up with the last 4 characters from each of the above i.e. this thos I thought of using cut -c ... but I'm not sure how many characters will... (7 Replies)
Discussion started by: josslate
7 Replies

5. Shell Programming and Scripting

Remove characters other than ISO8859-1

Hi please help in writing a script for replacing all the non-iso8859-1 characters to question marks. I need a pattern of this kind "sed s/<non-iso char range>/?/g < ipfile > opfile" Please help me in this. (2 Replies)
Discussion started by: rprajendran
2 Replies

6. UNIX for Dummies Questions & Answers

How do I remove ^M characters with VI

I have a file with all kinds of ^M at the end of each line. How the heck can these be removed? I tried a global search and replace, but it doesn't seem to work. Thanks! (8 Replies)
Discussion started by: HmmBerger
8 Replies

7. Shell Programming and Scripting

Remove characters from text

I have a file which looks like this. I only show first 11 lines of the file followed by some text that appears at the end of every file. 1. file:///path1/path2/path3/path4/251192.dat (score 3.849384, docid 142923) 2. file:///path1/path2/path3/path4/173859.dat (score 3.831033, docid 75365) 3.... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies

8. Shell Programming and Scripting

Remove the Characters '[' and ']' with Sed

Hi, I am new to Sed and would like to know if it is possible to remove the characters . I have a couple of files with a keyword and would like to remove the substring. I am Using sed s/// but Its not working Thanks for your Support Andrew Borg (2 Replies)
Discussion started by: andrewborg
2 Replies

9. Shell Programming and Scripting

Remove the last 9 characters of a filename

Hi All! Please can someone help, I have a dir with the following files: ~-rw-r--r-- 1 emmuser users 2087361 Oct 16 15:50 MPGGSN02_20131007234519_24291.20131007 -rw-r--r-- 1 emmuser users 2086837 Oct 16 15:50 MPGGSN02_20131007233529_24272.20131007 -rw-r--r-- 1 emmuser ... (7 Replies)
Discussion started by: fretagi
7 Replies

10. Shell Programming and Scripting

Remove first 2 characters and last two characters of each line

here's what im trying to do. i have a file containing lines similar to this: data.txt: 1hsRmRsbHRiSFZNTTA1dlEyMWFkbU5wUW5CSlIyeDFTVU5SYjJOSFRuWmpia0ZuWXpKV2FHTnRU 1lKUnpWMldrZFZaMG95V25oYQpSelEyWTBka2QyRklhSHBrUjA1b1kwUkJkd3BOVXpWM1lVaG5k... (5 Replies)
Discussion started by: SkySmart
5 Replies
UNCLUTTER(1)						      General Commands Manual						      UNCLUTTER(1)

NAME
unclutter - remove idle cursor image from screen SYNOPSIS
unclutter [-display|-d display] [-idle seconds] [-keystroke] [-jitter pixels] [-grab] [-noevents] [-reset] [-root] [-onescreen] [-visible] [-regex] [-not|-notname name ...] [-notclass class ...] DESCRIPTION
unclutter removes the cursor image from the screen so that it does not obstruct the area you are looking at after it has not moved for a given time. It does not do this if the cursor is in the root window or a button is down. It tries to ignore jitter (small movements due to noise) if you have a mouse that twitches. OPTIONS
-display is followed by the display to open. -idle is followed by the number of seconds between polls for idleness. The default is 5. Supports subsecond idle times. -keystroke tells unclutter not to use a timeout to determine when to remove the cursor, but to instead wait until a key has been pressed (released, really). -jitter is followed by the amount of movement of the pointer that is to be ignored and considered as random noise. The default is 0. -grab means use the original method of grabbing the pointer in order to remove the cursor. This often doesn't interoperate too well with some window managers. -noevents stops unclutter sending a pseudo EnterNotify event to the X client whose cursor has been stolen. Sending the event helps programs like emacs think that they have not lost the pointer focus. This option is provided for backwards compatibility in case some clients get upset. -reset resets the timeout for idleness after the cursor is restored for some reason (such as a window being pushed or popped) even though the x y coordinates of the cursor have not changed. Normally, the cursor would immediately be removed again. -root means remove the cursor even if it is on the root background, where in principle it should not be obscuring anything useful. -onescreen restricts unclutter to the single screen specified as display, or the default screen for the display. Normally, unclutter will unclutter all the screens on a display. -visible ignore visibility events (does not apply to -grab). If the cursor never gets hidden, despite a generous -jitter value, try this option -not is followed by a list of window names where the cursor should not be removed. The first few characters of the WM_NAME property on the window need to match one the listed names. This argument must be the last on the command line. -notname is exactly the same as -not -notclass is similar to -notname, except that the WM_CLASS property of the window is used. This argument must be the last on the command line, and so cannot be used with -not or -notname. -regex treats the first name or class (see above) as a regular expression. This means that `` -regex -not foo bar '' will not work as expected; instead use `` -regex -not 'foo|bar' ''. LIMITATIONS
The -keystroke option may not work (that is, the cursor will not disappear) with clients that request KeyRelease events. Games and Xt applications using KeyUp in their translation tables are most likely to suffer from this problem. The most feasible solution is to extend unclutter to use the XTest extension to get all keyboard and mouse events, though this of course requires XTest to be in the server too. The -keystroke option does not distinguish modifier keys from keys which actually generate characters. If desired this could be imple- mented in a simple way by using XLookupString to see if any characters are returned. DIAGNOSTICS
The message someone created a sub-window to my sub-window! means that unclutter thinks a second unclutter is running, and tried to steal the cursor by creating a sub-window to the sub-window already used to steal the cursor. This situation quickly deteriorates into a fight no one can win, so it is detected when possible and the program gives up. AUTHOR
Mark M Martin. cetia 7feb1994. mmm@cetia.fr UNCLUTTER(1)
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy