Sponsored Content
Full Discussion: add a word in the middle
Top Forums Shell Programming and Scripting add a word in the middle Post 302297167 by pitagi on Thursday 12th of March 2009 05:20:26 PM
Old 03-12-2009
thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Add Lines in middle of file

I need to add a new lines with certain data, to an existing file, every 5 lines in the file. There is no way to find any distinct charater pattern so I will have to do a line count and then insert the new line. I think using awk or sed is what I need to do. Any help is appreciated. Kunder (2 Replies)
Discussion started by: kunder
2 Replies

2. Shell Programming and Scripting

Problem to add the string(without sed & awk) into the middle of file

Hi, I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution. I first tried by $echo "paki" >> file This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
Discussion started by: ali hussain
5 Replies

3. Shell Programming and Scripting

add a string in the middle of the file

i want to add a string in a very top of a file without using VI or SED or AWK this is what ive done: (echo '0a'; echo 'LINE OF TEXT'; echo '.'; echo 'wq') | ed -s myfile to add astrng right in the middle i could have count the lines of the file and just chenge the address. ... (6 Replies)
Discussion started by: ciroredz
6 Replies

4. Shell Programming and Scripting

add text in the middle of file

Can anyone help me pls? I want to add a text into the middle of file. I've writtenthe following script text to add="$1" file="$2" lines=$(wc -l $2) half_lines=$(expr $lines / 2) head -$half_lines $2 > temp echo "text to add" >> temp ((half_lines=$half_lines + 1)) tail -$half_lines $2... (6 Replies)
Discussion started by: relle
6 Replies

5. Shell Programming and Scripting

Script to add a single line to middle of text file.

I've got a configuration file that is filled with xml text statements for example: <...../> <...../> <...../> <data id="java-options" value="-server -Djava.security.policy..../> <...../> <...../> <...../> I want to write a korn shell script that will go to this specific line and add a... (2 Replies)
Discussion started by: progkcp
2 Replies

6. UNIX for Dummies Questions & Answers

Add string to middle of a file

Hi, I want to write a script that takes a file and a string as params and adds the string to the middle line of the file. Also, I want to output the results back to the original file passed without using temp files. I am very much new to UNIX so this is all a little like black magic to me at... (15 Replies)
Discussion started by: Chiefos
15 Replies

7. Shell Programming and Scripting

Grep with wildcard in middle of word

How can grep G.*schema give me the result: ${Gacntg_dt}""'"' doesn't G.*schema say give me an unlimited number of characters between G and schema? :confused: (3 Replies)
Discussion started by: danmauer
3 Replies

8. UNIX for Dummies Questions & Answers

printing only the middle word between two patterns

How would I print the word "and" between the words "FOO" and BAR" using sed? My file has three words in it FOO and BAR. I only want the word "and". Thanks every one. (7 Replies)
Discussion started by: tigta09
7 Replies

9. Shell Programming and Scripting

grep middle word between two patterns

Hi, I'm currently working on a shell script to automate a backup check on oracle database. My requirement is to grep the words between two delimiters and pass on to a variable.. for ex I have following values in my log file... (DB_NAME), (163.24 25), (16/02/10 23:40), (COMPLETED), I want... (5 Replies)
Discussion started by: senthil3d
5 Replies

10. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies
CENV(7) 						 Miscellaneous Information Manual						   CENV(7)

NAME
cenv - cWnn Environment Operation Functions. DESCRIPTION
The followings are the operation functions available in every environment. The user may update his environment by using these functions. For example, he may need to add another dictionary, or need to change the values for certain conversion parameter. When function key PF6 is pressed, a menu will be displayed. Move the cursor to the particular option and press the return key. The corre- sponding function will then be carried out. OPTIONS
1. Add dictionary To add a dictionary to the current environment. 2. View dictionary To view all the dictionaries in the current environment, as well as their current states. 3. Word/Character add To add a word into a dynamic dictionary. 4. Word/Character search To check if a word/character exists in the dictionary under the current environment. If it exists, the system will show the informa- tion of word/character. 5. Parameter update To enquire or change the parameters for the Pinyin-Hanzi conversion under the current environment. Different environments will have different parameters. 6. Save usage frequency Save all the usage frequency files under the current environment. 7. Dictionary information To inquire the information of the dictionaries under the current environment. For example the dictionary name, type and priority etc. 8. Grammar change To change the grammar file used in the environment. 9. Exit To exit the environment operation function. NOTE
PF6 is the default keyboard definition in cWnn, it may be redefined. 13 May 1992 CENV(7)
All times are GMT -4. The time now is 05:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy