Sponsored Content
Top Forums Shell Programming and Scripting Help with sed and inserting text from another file Post 302744345 by barrydocks on Friday 14th of December 2012 08:14:22 AM
Old 12-14-2012
Quote:
Tried these before posting here without any successSmilie

I initially thought it might be a permissions problem but I am running the commands as root so it can't be

@michaelrozar17
The default file is as created by ubuntu install (this is a vanilla server install), the txt file created at the terminal via putty - however both have been opened on the webmin file browser on an XP machine, I can't be certain they weren't modified.

Used the dos2unix command on both files but still no luckSmilie

Last edited by barrydocks; 12-14-2012 at 09:26 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Question about sed. Inserting text in field?

Hi, I have tried to develop a sed script that inserts date and time in the third field in the first and second row below. The third row is an example and it shows where the date and time should be inserted. The script should check if the row already has date and time in the third field and if it... (2 Replies)
Discussion started by: pcrs
2 Replies

2. Shell Programming and Scripting

Inserting New Line in File using Sed ??

Dear All, I have a file called football where i have a list of 11 players each on different lines. I wish to add a name of another player on the first line. I have created a file called footballscript in vi writing the following sed command to achieve this ... cat football | sed -e '1 i\... (4 Replies)
Discussion started by: Mary_xxx
4 Replies

3. Shell Programming and Scripting

inserting subscriber no in text file using KSH....

:confused:Dears , I have text file I need to insert the subscriber number at position 32, and need to keep the next field at position 53 (no increasing of the record lenght), I mean I just want to replace the spaces at position 32 with subscirber number . for example A B A ... (1 Reply)
Discussion started by: atiato
1 Replies

4. Shell Programming and Scripting

Inserting text and modifying the file

I am in a dire need of doing this job , please help from shell script or perl script. It will be highly appreciated. Please have a look at the following INPUT file; The first 14 rows are not of interest but I want them to be included in the output file as they are. From the row 14... (3 Replies)
Discussion started by: digipak
3 Replies

5. Shell Programming and Scripting

inserting a string to a text file

Hello Can somebody please help me with the following script? I'm trying to create a text file with 20 blank lines and then insert a string in line 2 but nothing is printed in the itxtfile. I can create the file with 20 blank lines but when I "tell" it to print something on the second line, it... (4 Replies)
Discussion started by: goude
4 Replies

6. Shell Programming and Scripting

Inserting text to file, sed and variable not acting right

I want to put text stored in a variable into a file on the 7th line. I'm having trouble with this line: sed '7i\'$text'' $file It works perfectly for a single word, but fails if there are two words because of the space. I've tried several forms of quoting and this is the only one that... (2 Replies)
Discussion started by: fubaya
2 Replies

7. Shell Programming and Scripting

Inserting text with SED

Hi guys, I need to insert @test.com after each entry in my .txt file. 1 2 3 4 1@test.com 2@test.com 3@test.com 4@test.com Tried to use cat test.txt |sed 's/$/@test.com/'but it does this instead: 1 @test.com 2 (6 Replies)
Discussion started by: spirm8
6 Replies

8. UNIX for Dummies Questions & Answers

Inserting a column into a text file

I have a tab delimited text file with multiple columns (data.txt). I would like to insert a column into the text file. The column I want to insert is in a text file (column.txt). I want to insert it into the 5th column of data.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

9. Shell Programming and Scripting

Inserting text into a new file

Hi all, I want to create a file and then insert some text into it. I'm trying to create a .sh script that will create a new python file from a template. Can someone tell me why this won't work, touch $1 | sed -e '1i\Some test code here' Sorry I'm quite new to all this! Just as a side... (3 Replies)
Discussion started by: ahodgson
3 Replies

10. UNIX for Dummies Questions & Answers

Inserting text into a file with awk or sed

Hello, I've been trying to get a script working that fetches weather-data and converts it into an .ics file. The script works so far put I'm stuck at the point where I need to add specific static data. A thorough search through the forum did not point me into the right direction. #!/bin/bash... (3 Replies)
Discussion started by: Schubi
3 Replies
yelp(1) 							   User Commands							   yelp(1)

NAME
yelp, gnome-help - GNOME help browser SYNOPSIS
yelp [URL] [gnome-std-options] gnome-help [URL] [gnome-std-options] DESCRIPTION
The GNOME help browser is a utility that allows users to view documentation for GNOME in several formats including man pages, HTML, SGML(DocBook), and GNU info files. OPTIONS
The following options are supported: gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. OPERANDS
The following operands are supported: URL This allows you to view a specific help document by providing the complete URL to the documentation that you wish to view. If URL starts with "ghelp:", yelp opens the help document within ghelp. If URL does not start with "ghelp:", yelp attempts to launch a default Internet browser window and display the contents of the help document within this browser window. EXTENDED DESCRIPTION
The GNOME Handbook of Writing Software Documentation is available at the following URL: http://developer.gnome.org/projects/gdp/handbook.html To access the API documentation for including help in applications, you must install the developer version of the package. EXAMPLES
Example 1: Launching GNOME Help Browser example% yelp Example 2: Launching GNOME Help Browser and loading the help information for gnome-printinfo example% yelp ghelp:///usr/share/gnome/help/gnome-print-manager/C/gnome-print-manager.xml Example 3: Launching GNOME Help Browser with a standard Internet URL example% yelp http://www.gnome.org The default Internet browser is launched (unless a browser is already running), and this URL is displayed within the browser window. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: INFOPATH Location of GNU Info files. MANPATH Location of man pages. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/yelp Executable for GNOME help browser /usr/bin/gnome-help Executable for GNOME help browser ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-help-viewer | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. gnome-std-options(5), scrollkeeper-config(1), scrollkeeper(1), scrollkeeper-devel(1) NOTES
yelp and gnome-help are both the same application. Written by Matt Keenan, Sun Microsystems Inc., 2003. SunOS 5.10 8 Oct 2003 yelp(1)
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy