How do I replace a space " " character at a particular position in a line?
e.g. I have a file below
$ cat i2
111 002 A a
33 0011 B c
2222 003 C a
I want all the 1st spaces to be replaced with forward slash "/" and the 3rd spaces to have 5 spaces to get the output below:
111/002... (8 Replies)
Hi,
I am working on a command that replaces some occurrences of quotation marks in file. The quotation mark cannot be the first or the last character in line and cannot be preceded or followed by a comma.
I am not an expert in regular expressions, but I managed to create the following... (2 Replies)
Hey all.
Easy question.
I have a (ksh) varaible x. It contains the following (for example): N557788
I want to replace the "N" with a "-".
I've done this before but for the life of me I cannot remember how I did it.
Thanks.
mtw (2 Replies)
Hello, I need to do this in python but I'm just learning py and it's quite urgent.
I have a script I created and need an interactive python script to modify part of a line.
MY SCRIPT
#ligand prep. Uses 'ind' prefix. The initial ligand must be ind.pdb. This
#generates ind.pdbqt.... (0 Replies)
Hi, I need to do a global search and replacement of a non-ascii character. Let me first give the background of my problem.
Very frequently, I need to copy set of references from different sources. Typically, a reference would like this:
Banumathy et al., 2002 G. Banumathy, V. Singh and U.... (1 Reply)
I have below line in a unix file, I want to delete one character after "Â".
20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids
The result should be :
20091020.Non-Agency CMO Daily Trade Recap  Hybrids
i dont want to use "~V" anywhere in the sed command or any other command, just remove... (1 Reply)
Hi,,
I have the line below in a file:
$!VarSet |LFDSFN1| = '"E:\APC\Trials\20140705_427_Prototype Trial\Data\T4_20140705_Trial_Cycle_Data_13_T_Norm.txt" "VERSION=100 FILEEXT=\"*.txt\" FILEDESC=\"General Text\" "+""+"TITLE{SEARCH=NONE NAME=\"New Dataset\" LINE=1I want to write a script to change... (2 Replies)
Hello Gurus,
I have a script developed...
#!/bin/bash
#---------------------------------------------------------------------
# This pScript will remove/replace the special characters fromfiles
#---------------------------------------------------------------------
trxdate="`date... (1 Reply)
Discussion started by: nanduedi
1 Replies
LEARN ABOUT HPUX
paste
paste(1) General Commands Manual paste(1)NAME
paste - merge same lines of several files or subsequent lines of one file
SYNOPSIS
file1 file2 ...
list file1 file2 ...
list] file1 file2 ...
DESCRIPTION
In the first two forms, concatenates corresponding lines of the given input files file1, file2, etc. It treats each file as a column or
columns in a table and pastes them together horizontally (parallel merging). In other words, it is the horizontal counterpart of cat(1)
which concatenates vertically; i.e., one file after the other. In the option form above, replaces the function of an older command with
the same name by combining subsequent lines of the input file (serial merging). In all cases, lines are glued together with the tab char-
acter, or with characters from an optionally specified list. Output is to standard output, so can be used as the start of a pipe, or as a
filter if is used instead of a file name.
recognizes the following options and command-line arguments:
Without this option, the new-line characters
of all but the last file (or last line in case of the option) are replaced by a tab character. This option allows replac-
ing the tab character by one or more alternate characters (see below).
list One or more characters immediately following replace the default tab as the line concatenation character. The list is
used circularly; i.e., when exhausted, it is reused. In parallel merging (that is, no option), the lines from the last
file are always terminated with a new-line character, not from the list. The list can contain the special escape
sequences: (new-line), (tab), (backslash), and (empty string, not a null character). Quoting may be necessary if charac-
ters have special meaning to the shell. (For example, to get one backslash, use ).
Merge subsequent lines rather than one from each input file.
Use tab for concatenation, unless a list is specified with the option. Regardless of the list, the very last character of
the file is forced to be a new-line.
Can be used in place of any file name
to read a line from the standard input (there is no prompting).
EXTERNAL INFLUENCES
Environment Variables
determines the locale for the interpretation of text as single- and/or multi-byte characters.
determines the language in which messages are displayed.
If or is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty
variable. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of
If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
These commands return the following values upon completion:
Completed successfully.
An error occurred.
EXAMPLES
List directory in one column:
List directory in four columns
Combine pairs of lines into lines
Notes
works similarly, but creates extra blanks, tabs and new-lines for a nice page layout.
DIAGNOSTICS
Except for the option, no more than - 3 input files can be specified (see limits(5)).
AUTHOR
was developed by OSF and HP.
SEE ALSO cut(1), grep(1), pr(1).
STANDARDS CONFORMANCE paste(1)