Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do I remove ^M characters with VI Post 302531617 by n1djs on Friday 17th of June 2011 09:54:27 AM
Old 06-17-2011
Removing ^M's from a file with VI

Inside VI type this
:s/^V^M//g

Where ^V = the control key and the V key pressed together
and ^M = the control key and the M key pressed together
 

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 Advanced & Expert Users

remove characters

hi i have a file with these strings: 123_abc_X1116990 how to get rid of 123_abc_ and keep only X1116990? I have columns of these: 123_abc_X1134640 123_dfg_X1100237 123_tyu_X1103112 123_tyui_X1116990 thx (5 Replies)
Discussion started by: melanie_pfefer
5 Replies

4. 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

5. 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

6. 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

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
XkbActionCtrls(3)						   XKB FUNCTIONS						 XkbActionCtrls(3)

NAME
XkbActionCtrls - Returns the ctrls fields of act converted to an unsigned int SYNOPSIS
unsigned int XkbActionCtrls (XkbCtrlsAction act); ARGUMENTS
- act action from which to extract controls DESCRIPTION
Actions associated with the XkbCtrlsAction structure change the state of the boolean controls. The type field can have any one of the values shown in Table 1. Table 1 Controls Action Types -------------------------------------------------------------- Type Effect -------------------------------------------------------------- XkbSA_SetControls A key press enables any boolean controls specified in the ctrls fields that were not already enabled at the time of the key press. A key release disables any controls enabled by the key press. This action can cause XkbControlsNotify events. XkbSA_LockControls If the XkbSA_LockNoLock bit is not set in the flags field, a key press enables any controls specified in the ctrls fields that were not already enabled at the time of the key press. If the XkbSA_LockNoUnlock bit is not set in the flags field, a key release dis- ables any controls specified in the ctrls fields that were not already dis- abled at the time of the key press. This action can cause XkbControlsNotify events. The flags field is composed of the bitwise inclusive OR of the masks shown in Table 2. Table 2 Control Action Flags -------------------------------------------------------------- Flag Meaning -------------------------------------------------------------- XkbSA_LockNoLock If set, and the action type is XkbSA_LockControls, the server only dis- ables controls. XkbSA_LockNoUnlock If set, and the action type is XkbSA_LockControls, the server only enables controls. The XkbSA_SetControls action implements a key that enables a boolean control when pressed and disables it when released. The XkbSA_LockCon- trols action is used to implement a key that toggles the state of a boolean control each time it is pressed and released. The XkbSA_Loc- kNoLock and XkbSA_LockNoUnlock flags allow modifying the toggling behavior to only unlock or only lock the boolean control. The ctrls0, ctrls1, ctrls2, and ctrls3 fields represent the boolean controls in the enabled_ctrls field of the controls structure. Xkb macros, to convert between the two formats. XkbActionCtrls returns the ctrls fields of act converted to an unsigned int. STRUCTURES
typedef struct _XkbCtrlsAction { unsigned char type; /* XkbSA_SetControls, XkbSA_LockControls */ unsigned char flags; /* with type, controls enabling and disabling of controls */ unsigned char ctrls3; /* ctrls0 through ctrls3 represent the boolean controls */ unsigned char ctrls2; /* ctrls0 through ctrls3 represent the boolean controls */ unsigned char ctrls1; /* ctrls0 through ctrls3 represent the boolean controls */ unsigned char ctrls0; /* ctrls0 through ctrls3 represent the boolean controls */ } XkbCtrlsAction; X Version 11 libX11 1.3.2 XkbActionCtrls(3)
All times are GMT -4. The time now is 04:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy