Sponsored Content
Operating Systems Linux Linux script to remove a character in a file based on position. Post 302594936 by Corona688 on Wednesday 1st of February 2012 02:26:11 PM
Old 02-01-2012
Show the input you have and the output you want please.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting a flat file based on multiple colums(using character position)

Hi, I have an urgent task here. I am required to sort a flat file based on multiple columns which are based on the character position in that line. I am restricted to use the character position instead of the space and sort +1 +2 etc to do the sorting. I understand that there is a previous... (8 Replies)
Discussion started by: cucubird
8 Replies

2. Shell Programming and Scripting

Remove/Find files based on position pattern

Hi All, Please help me to find or remove files based on position based search pattern. file1.txt: aaabbbccc dddeeefff iiijjjkkk file2.txt: lllmmmnnn ooopppqqq rrrsssttt file3.txt: uuuvvvwww xxxeeeyyy zzzcccooo From the above files, I like to delete the files that have "eee"... (1 Reply)
Discussion started by: kumarn
1 Replies

3. Shell Programming and Scripting

Cut multiple data based on character position

How to extract multiple data based on character position. I need to fetch from 7-9 and 22-26 and there is no delimiter for 22-26 since it is part of the column. The file may have more than 1000 character long.I managed to pull any one but not both for example test data 12345 zxc vbnmlk... (1 Reply)
Discussion started by: zooby
1 Replies

4. UNIX for Dummies Questions & Answers

Script to delete a word based on position in a file

Hi, I am new to unix. I want to delete 2 words placed at position say for example at 23rd and 45th position in a line. I used sed but couldnt achieve this. Example: the file contains 2 lines 12345 98765 "12345" 876 12345 98765 "64578" 876 I want to delete " placed at position 13 and 19... (4 Replies)
Discussion started by: nbks2u
4 Replies

5. Shell Programming and Scripting

How to remove a semi-repeating character in position 1 of a file

My file is in a good column format but several lines in the file begin with a zero. I'm in KSH and looking for a command to remove this zero and keep the text next to it. I don't want any of the zeros in the other columns removed. Below is a snip from the file... all I need to do is remove that... (2 Replies)
Discussion started by: right_coaster
2 Replies

6. Shell Programming and Scripting

Remove " character from 25th position in file

Hi All, I want to remove " character if present in position 25th in CSV file. Each field in CSV file is separated by , and enclosed in "" (enclosed using double quotes) For example "1","2","3",........."123 Tom " is Good boy","26",........"45" Where "1" first position character, ...... 25th... (8 Replies)
Discussion started by: lancesunny
8 Replies

7. UNIX for Dummies Questions & Answers

Change a character based on its position number

Hi I have a text file that I want to change some of the characters based on their position. My file contain multiple lines and characters should be counted continuously line by line. For example, I want to convert the 150th T to C. What can I do? Here is a portion of my file:... (10 Replies)
Discussion started by: a_bahreini
10 Replies

8. Shell Programming and Scripting

Splitting based on occurence of a Character at fixed position

I have a requirement where i need to split a file based on occurence of a character which is present at a fixed position. Description is as below: 1. The file will be more than 1 Lakh records. 2. Each line will be of fixed length of 987 characters. 3. At position 28 in each line either 'C' or... (9 Replies)
Discussion started by: Neelkanth
9 Replies

9. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

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
CHASEN(1)						      General Commands Manual							 CHASEN(1)

NAME
chasen - Japanese Morphological Analysis System SYNOPSIS
chasen [options] file DESCRIPTION
chasen is a morphological analysis system. It can segment and tokenize Japanese text string, and can output with many additional informa- tion (pronunciation, semantic information, and others). It will print the result of such an operation to the standard output, so that it can be either written to a file or further processed. OPTIONS
-s Use partial sentence mode for analysis. -j Use Japanese sentence mode for analysis. KUTEN (including other puncuation marks) and empty line are treated as the punctuation of the text. -C Use the command mode for analysis. -b Show the best path. (default) -m Show all morphemes where ambiguity is identified in the best path. -p Show all paths expanding for all combinations of the ambiguity. -f Show formatted morpheme data in column (default) -e Show entire morpheme data. -c Show coded morpheme data. -d Show detailed morpheme for use by Prolog. -v Show detailed morpheme for use by VisualMorphs. -O[c|s] Show morpheme as compound words or their segments. -F format Show morpheme formatted by the format such as "%m %y %M %U(%P-) %T %F " . -Fh Print help information for -F option. -i lang Specify the character encoding of the input file. e: EUC-JP, s:Shift JIS, w:UTF-8, u:UTF-8, a:ISO-8859-1 -o file Specify the output file to be file . -w width Specify the cost width. -r rcfile Use rcfile as the chasenrc file. -R Use the system default chasenrc file (/etc/chasenrc). -L lang Specify language. -lp Print the list of parts of speech (hinshi). -lt Print list of conjugation types. -lf Print list of conjugation forms. -h Print help. -V Print ChaSen version number. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. SEE ALSO
The programs are documented fully by /usr/share/doc/chasen/manual-j.tex or /usr/share/doc/chasen/manual-j.pdf. AUTHOR
This manual page was written by Takao KAWAMURA <kawamura@debian.or.jp> and modified by Hideki Yamane <henrich@debian.or.jp> and Osamu Aoki <osamu@debian.org> for the Debian GNU/Linux system (but may be used by others). CHASEN(1)
All times are GMT -4. The time now is 10:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy