Sponsored Content
Top Forums Shell Programming and Scripting Inserting New Line in File using Sed ?? Post 302171128 by Stach on Wednesday 27th of February 2008 03:50:25 PM
Old 02-27-2008
Void the backslash to make sed happy:
Code:
cat football | sed -e '1 i zidane' > newfootball

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

inserting a new line in a file

I'm sure you guys have answered this elsewhere but I can't seem to find where so here goes. #!/bin/bash n=120 a=$(sed '120q;d' energy.xvg) while ;do a=$(sed $n'q;d' energy.xvg) echo "$a \n" > newfile n=$(($n+100)) done exit 0 that script should read the file energy.xvg, start at... (1 Reply)
Discussion started by: gelitini
1 Replies

2. Shell Programming and Scripting

Need Help in Inserting a new line in a file using PERL

I need a perl script to find and replace a specific pattern in a file to a new line. BAsically I have a single line data in a file with 10 mb to 200 MB. I want to put a new line based on a specific pattern to open the file in Excel / Access. Following is the sample data in a file ... (1 Reply)
Discussion started by: portalfaq
1 Replies

3. Shell Programming and Scripting

inserting line to a file

I have posted it previously but somehow could not delete the previous post.I felt i could not explain the problem statement well. Here t goes.I have a file say File1. Now i need a specific pattern from the lines to be added to the other line. File: red blue green ABC.txt@ABC END black... (1 Reply)
Discussion started by: ngupta
1 Replies

4. Shell Programming and Scripting

Inserting IP in one line of a file

Hi, I have this line: ip=111.222.133.144,mac=00:16:3E:2A:08:3C,vifname=veth360','ip=10.2.3.4,vifname=veth360a' ^ | ------- I want to insert this IP 144.133.222.111 between "144"... (4 Replies)
Discussion started by: iga3725
4 Replies

5. Shell Programming and Scripting

Inserting a line in a file after every alternate line

Friends , I have a large file and i need to insert a line after every line.I am actually unaware how to do it.Any help appreciated. My File control station *ATM* , qread $OSS.Jul13A.FI01 interval 1 intcount 1 control station *ATM* , qread $OSS.Jul13A.FI02 interval 1 intcount... (4 Replies)
Discussion started by: appu2176
4 Replies

6. Shell Programming and Scripting

inserting line at particular linenumber using sed

Could anyone tell me how to insert a line at a particular line number using sed. sed '2i\newtext' filename I have tried the above command .But it is not working. I am using tcsh shell .Please help. Double post, continued here (0 Replies)
Discussion started by: maitree
0 Replies

7. Shell Programming and Scripting

Inserting a new line into an already existing file

hello .. I am new to perl scripting, I have a text file, and would like to insert 3 new lines into the same file at different line numbers using perl scripting. Any Help regarding this will be very useful. say the file is sample.txt, contents are aaaaa bbbb ccccc dddd eeeee ffffffff... (4 Replies)
Discussion started by: hemalathak10
4 Replies

8. Shell Programming and Scripting

Help with sed and inserting text from another file

I need to insert text from one file into another file after specific term. I guess sed is the best method of doing this and I can insert a specified text string using this script but I am not sure how to modify it to insert text from another file: #!/bin/sh sed 's/\<VirtualHost... (17 Replies)
Discussion started by: barrydocks
17 Replies

9. 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

10. Shell Programming and Scripting

Inserting a line to a file

Hi, consider a file called mobile.txt as follows: For type lovers, add a new line at the end of it by copying its previous line and add a +1 to the field1, field2 Additionally, there are only 3 plans available to lovers type, so it should not work for lovers type already having 3 lines under... (11 Replies)
Discussion started by: Gautham
11 Replies
pioneers-server-console(6)					   Games Manual 					pioneers-server-console(6)

NAME
pioneers-server-console - command-line game server for Pioneers SYNOPSIS
pioneers-server-console [ OPTIONS ] DESCRIPTION
This manual page documents briefly the pioneers-server-console command. Pioneers is an implementation of the popular, award-winning "Settlers of Catan" board game for the GNOME desktop environment. It uses a client/server model for networked play of between two and eight players. This program provides a console-only server that pioneers clients can connect to. OPTIONS
Application options -g,--game-title game title Load the ruleset specified by game title. The title can be found in the *.game files. You need quotes for titles with spaces. --filefilename Load the ruleset in the file filename. -p,--port port Use port port for player connections. -P,--players num Start a game for num total players (including computer players). -v,--points points Specify the number of "victory points" required to win the game. -R,--seven-rule[0|1|2] "Sevens rule": Specify gameplay behavior when a player rolls a seven. A value of 0 (the default) means that rolling a seven always moves the robber. A value of 1 requires the player to re-roll if a seven is rolled on the first two turns. A value of 2 means the player always re-rolls. -T,--terrain[0|1] Choose a terrain type: 0 for the default, or 1 for random terrain. -c,--computer-players num Start up num computer players. --version Show version information. Meta-server options -r,--register Register with a meta server. The meta server to use can be overridden with the -m option. Default meta sever: pioneers.debian.net -m,--meta-server metaserver Register this server with the metaserver at the specified address. -n, --hostname hostname Use this hostname instead of the hostname reported by hostname(1). Miscellaneous options -x,--auto-quit Automatically exit after a player has won. -k,--empty-timeout secs Automatically stop the server if no one has connected after secs seconds. -t,--tournament mins Tournament mode: add AI players after mins minutes. -a,--admin-port port Listen for administrative commands on port port. -s,--admin-wait Don't start the game immediately; wait for a command on the admin port (-a) instead. --fixed-seating-order Give players numbers according to the order they enter the game. --debug Enable debug messages. ENVIRONMENT
The default settings of the server can be influenced with the following three environment variables: PIONEERS_META_SERVER The hostname of the meta-server when no meta-server is specified on the command-line. PIONEERS_SERVER_NAME The hostname of the server. If it is not set, the hostname is determined by hostname(1). PIONEERS_DIR The path to the game definition files. If it is not set, the default installation path will be used. FILES
/usr/share/games/pioneers/*.game and $XDG_DATA_HOME/pioneers/*.game Game definitions /usr/share/games/pioneers/computer_names A list of names the computer player can use AUTHOR
This manual page was written by Steve Langasek <vorlon@debian.org>, and updated by Roland Clobus <rclobus@rclobus.nl>. Pioneers was writ- ten by Dave Cole <dave@dccs.com.au>, Andy Heroff <aheroff@mediaone.net>, and Roman Hodek <roman@hodek.net>, with contributions from many other developers on the Internet; see the AUTHORS file in the pioneers distribution for a complete list of contributing authors. SEE ALSO
pioneers(6), pioneers-server-gtk(6), pioneersai(6), hostname(1) pioneers January 8, 2012 pioneers-server-console(6)
All times are GMT -4. The time now is 03:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy