i want to ask how to delete character on specific position in line, lets say i want to remove 5 character from position 1000, so characters from position 1000-1005 will be deleted.
i found this sed command can delete 4 characters from position 10, but i dont know if bigger position or more characters to be delete is needed.
btw i'm using HP-UX
Hi,
I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!
awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
I am trying to use sed to replace specific characters at a specific position in the file with a different value... can this be done?
Example:
File:
A0199999123
A0199999124
A0199999125
Need to replace 99999 in positions 3-7 with 88888.
Any help is appreciated. (5 Replies)
Hello. I'm trying to delete one character in determinate position.
Example:
qwEtsdf123Ecv34
<delete character in positión 3>
Result:
qwtsdf123Ecv34
Plase, help me.
Thanks (4 Replies)
Hi,
I have a file like this (about 8 columns in total, this being the 2nd column)
gi_49482297_ref_YP_039521.1_
gi_49482297_ref_YP_039521.1_
gi_49482315_ref_YP_039539.1_
gi_49482315_ref_YP_039539.1_I want to remove the _ at the end of the line.
And at later stages I would want to replace the... (5 Replies)
Goodmorning,
I know how to cut a string and a column, and how to find a word.
I have a file with over 100 columns. All columns have a title in the first line. I have to delete all columns with the XXX title.
I can't use cut -f because the position of XXX columns change in each file, and in... (14 Replies)
Discussion started by: echo manolis
14 Replies
9. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT ULTRIX
wdelch
delch(3cur)delch(3cur)Name
delch, mvdelch, mvwdelch, wdelch - remove character from window
Syntax
#include <cursesX.h>
int delch()
int wdelch(win)
WINDOW *win;
int mvdelch(y, x)
int y, x;
int mvwdelch(win, y, x)
WINDOW *win;
int y, x;
Description
The routine deletes the character under the cursor in the default window. All characters to the right on the same line are moved to the
left one position and the last character on the line is filled with a blank. The cursor position does not change.
The routine deletes the character under the cursor in the specified window. All characters to the right on the same line are moved to the
left one position and the last character on the line is filled with a blank. The cursor position does not change.
The routine moves the cursor to the specified position in the default window. The character found at this location is deleted. All char-
acters to the right on the same line are moved to the left one position and the last character on the line is filled with a blank. The
cursor position does not change.
The routine moves the cursor to the specified position in the specified window. The character found at this location is deleted. All
characters to the right on the same line are moved to the left one position and the last character on the line is filled with a blank. The
cursor position does not change.
The routines and are macros.
Return Values
The and functions return OK on success and ERR on error.
delch(3cur)