01-13-2011
This reads as a homework assignment
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in
this forum under
special homework rules.
Please review the
rules, which you agreed to when you registered, if you have not already done so.
More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.
If you did post homework in the main forums, please review the
guidelines for posting homework and repost.
Thank You.
The UNIX and Linux Forums.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a log file with over 500000 lines and I want to use sed command to filter through the file and delete the first 5000 lines.
I have tried
sed -e '1,5000d' fileA.
where d is delete but this does not work. Any ideas ?
Regards
dodo14 :o (1 Reply)
Discussion started by: dodo14
1 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to use sed to process some files on Macs running OSX. Anyone know anything about Macs and sed?
Here's the problem
sed 's/^/ /g' test_file > endfile
(there are spaces betwen the second and third /, but the forum software compresses them)
This should put spaces at... (3 Replies)
Discussion started by: Laurel Maury
3 Replies
3. UNIX for Advanced & Expert Users
i need a sample unix awk/sed program to replace param3 in a file.
i have sample file a.dat with the following format/length (week 8, sku 20, store 20 and qty 8). all store id's which end with _2 needs to be replaced with div id 2. all store id's which end with _1 needs to be replaced with div id... (4 Replies)
Discussion started by: mnnarendra
4 Replies
4. Shell Programming and Scripting
hello,
i have a csh file that calls a program and stores the output in a variable. the output is: \*\%VFT\$1\\3
as you can see there is a backslash before every non alphanumeric character. i save this output and then use SED to replace a word in a file with the output that i got.
... (3 Replies)
Discussion started by: davea402
3 Replies
5. Shell Programming and Scripting
hi i want to append the number in each file,but when i ran this command:-
sed -i "1i 50" filename
its giving error sed: illegal option -- i in HP unix
but its working in linux.
any advice !!!!!!!!! (6 Replies)
Discussion started by: abhigrkist
6 Replies
6. UNIX for Advanced & Expert Users
Hi,
I am a new student learning about Unix. Can anyone help with the following sed command. What would this command do?
sed -n -e '/^s/p'
Any help you can provide would be a big help.
Thanks in advance! (2 Replies)
Discussion started by: dgigga
2 Replies
7. Shell Programming and Scripting
Can someone explain what this sed statement mean to me?
zcat 2014-04-09.txt.gz | grep -a 'CodeOne:.*CodeTwo=101' | grep -v 'List=Pass' | sed 's/^.*Pass=\(*\),.*Reject=\(*\),.*All=\(*\),.*$/\1,\2,\3/'
I think what confusing mean is the .* and the *$. Now exactly sure how they work. (7 Replies)
Discussion started by: scj2012
7 Replies
8. How to Post in the The UNIX and Linux Forums
I have a fixed length file that looks like
a@ a00 a00000 a00 a000000 a00 a0000 a0000 a00000000 a01
a@ a1 a2 a11 a22 a12 a13 a44 a45 a54 a65 a76 a77
a@ a1 a3 a6 a7 a9 a8 a2 a7 a8 a8 a9 a0
b@ b00 b00000 b00... (1 Reply)
Discussion started by: RJG
1 Replies
9. Shell Programming and Scripting
I have a fixed length file a.txt that looks like
a@ a00 a00000 a00 a000000 a00 a0000 a0000 a00000000 a01
a@ a1 a2 a11 a22 a12 a13 a44 a45 a54 a65 a76 a77
a@ a1 a3 a6 a7 a9 a8 a2 a7 a8 a8 a9 a0
b@ b00... (7 Replies)
Discussion started by: RJG
7 Replies
10. UNIX for Beginners Questions & Answers
I have a text file containing multiple lines like
password="&test.";
password="xyz";
password='write some';
password="&testwrite.";
today='o1jan2017'd;
-----------------
------------------
I don't want to replace the string value which are starting with & for Password variable... (3 Replies)
Discussion started by: harshabag
3 Replies
LEARN ABOUT DEBIAN
nwbpset
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
'nwbpvalues -c'. See util/nwbpsecurity for an example.
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)