Sponsored Content
Top Forums Shell Programming and Scripting Add text to beginning of file Post 302133610 by ghostdog74 on Friday 24th of August 2007 07:24:54 AM
Old 08-24-2007
Code:
sed -i  '1i add here' file*bat

This User Gave Thanks to ghostdog74 For This Post:
 

10 More Discussions You Might Find Interesting

1. Linux

Add file's date at beginning of every line in file

How would I do that? /Rutger (6 Replies)
Discussion started by: rutgerblom
6 Replies

2. UNIX for Dummies Questions & Answers

Count Number Of lines in text files and append values to beginning of file

Hello, I have 50 text files in a directory called "AllFiles" I want to make a program that will go inside of the "AllFiles" Directory and count the number of lines in each individual text file. Then, the program will calculate how many more lines there are over 400 in each text file and... (7 Replies)
Discussion started by: motoxeryz125
7 Replies

3. Shell Programming and Scripting

Need to insert text(constant) at the beginning of file

I am very new to scripting and I know this request is simple but I am having no luck with it. I have a file a.dat with the following data in it. aa bb cc dd I need to run a script that will take each line of a.dat and put dsjc/ubin/ in front of each record, so the output looks like ... (2 Replies)
Discussion started by: jclanc8
2 Replies

4. Shell Programming and Scripting

trying to add text to beginning and end of each line

Well here goes: I tried to write a batch file that adds a specific fixed text to each line of an already existing text file. for the adding text infront of each line I tried this: for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt for adding text after each line I... (0 Replies)
Discussion started by: pasc
0 Replies

5. Windows & DOS: Issues & Discussions

Trying to add text to the beginning of each line

Well here goes: I tried to write a batch file that adds a specific fixed text to each line of an already existing text file. for the adding text infront of each line I tried this: for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt for adding text after each line I... (6 Replies)
Discussion started by: pasc
6 Replies

6. UNIX for Dummies Questions & Answers

Add word/value at the beginning of each line in a file

how to add value/word at the beginning of each line in a file ? i have file number.txt and the output is below 1000 1001 1002 1003 1004 i want to add 000 at the beginning of each line, desire output is below 0001000 0001001 0001002 0001003 0001004 and so on please advise how... (5 Replies)
Discussion started by: jason6247
5 Replies

7. Shell Programming and Scripting

How to add a text at the beginning of a text files in a folder?

how to add a text ( surya) at the beginning of a text files (so many) in folder text file: 111111 555555 666666 result: surya 111111 555555 666666 (3 Replies)
Discussion started by: suryanarayana
3 Replies

8. Shell Programming and Scripting

Add new line at beginning and end of a file

Hi, I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|". I am looking for some command/option to join these two in single command parameter. ... (6 Replies)
Discussion started by: bhupinder08
6 Replies

9. Shell Programming and Scripting

How to add one line in the beginning of the file?

Hi gurus, I need add one new line in the begining of current file. current file abc cde add xyz output file newline abc cde add xyz (6 Replies)
Discussion started by: ken6503
6 Replies

10. Shell Programming and Scripting

Add words in beginning , end after removing a word in a file

My file has the entries like below... /dev/sds /dev/sdak /dev/sdbc /dev/sdbu I want to make the file like below echo 1 > /sys/block/sds/device/rescan echo 1 > /sys/block/sdak/device/rescan echo 1 > /sys/block/sdbc/device/rescan echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
NWBPSET(1)							      nwbpset								NWBPSET(1)

NAME
nwbpset - Create a bindery property or set its value SYNOPSIS
nwbpset [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] DESCRIPTION
nwbpset Reads a property specification from the standard input and creates and sets the corresponding property. The format is determined by the output of 'nwbpvalues -c'. nwbpset will hopefully become an important part of the bindery management suite of ncpfs, together with As another example, look at the following command line: nwbpvalues -t 1 -o supervisor -p user_defaults -c | sed '2s/.*/ME/'| sed '3s/.*/LOGIN_CONTROL/'| nwbpset With this command, the property user_defaults of the user object 'supervisor' is copied into the property login_control of the user object 'me'. nwbpvalues -t 1 -o me -p login_control -c | sed '9s/.*/ff/'| nwbpset This command disables the user object me. Feel free to contribute other examples! nwbpset looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of $HOME/.nwclient MUST be 600 for security reasons. OPTIONS
-h -h is used to print out a short help text. -S server server is the name of the server you want to use. -U user user is the user name to use for login. -P password password is the password to use for login. If neither -n nor -P are given, and the user has no open connection to the server, nwbpset prompts for a password. -n -n should be given if no password is required for the login. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. AUTHORS
nwbpset was written by Volker Lendecke. See the Changes file of ncpfs for other contributors. nwbpset 8/7/1996 NWBPSET(1)
All times are GMT -4. The time now is 10:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy