10-19-2010
First opened is first numbered, but try it and see.
sed 's/\(\(.\).\).*/\1 \2/' <<!
abcdefg
!
ab a
This User Gave Thanks to DGPickett For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
what is the format for grep if I want to search from the current directory and through all its subdirectories?:) (3 Replies)
Discussion started by: pkappaz
3 Replies
2. Shell Programming and Scripting
Hi,
I am currently using grep -c to scan lines for certain data. I am just wondering if you can search a specific column of a file using grep -c.
Thanks (6 Replies)
Discussion started by: Jaken
6 Replies
3. Shell Programming and Scripting
I'm using grep in a shell and I was wondering:
Can I grep a file and then delete all files that contain what it returns?
So instead of grep 'blah' * and I have 50 files that have blah in it and I would have to delete all 50 manually, how would I just delete them all in one fell swoop? (3 Replies)
Discussion started by: tphegley
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am executing the below command.
grep ".UPDATE" file1.txt | grep -v MQQUEUE > Myprog1
The expected output is all lines in file1.txt which have the string ".UPDATE" and dont contain the string MQQUEUE.
However, the output which I am getting is just searching for the string... (3 Replies)
Discussion started by: saurabhsinha23
3 Replies
5. Programming
My SQL is very rust and I'm having a problem with a query.
First, here are the tables involved.
Table `os`:
+--------------------------------+
| id | distro | version |
+--------------------------------+
| 1 | CentOS | 5.2 |
| 2 | RHEL | 5 |
| 3 ... (1 Reply)
Discussion started by: Housni
1 Replies
6. UNIX for Dummies Questions & Answers
Instead of using the following command
#dmesg | grep -v sendmail | grep -v xntpd
How can I use just one grep -v and give both arguments.
Please suggest
thanks (4 Replies)
Discussion started by: Tirmazi
4 Replies
7. Shell Programming and Scripting
Hello,
Is there a way in grep to remember patterns?
For eg: int a,b,c,d,a;
If a variable is declared twice, like in the previous example, I should be able to print only those lines.
Is there a way to print only the lines where the variable name occurs more than once, using grep... (1 Reply)
Discussion started by: prasanna1157
1 Replies
8. Shell Programming and Scripting
All,
I am wanting to find out if I can do this in one grep statement
grep -R failed * |grep -iEw 'Mar 1|Feb 2'
I want to search all files in a directory for the text "failed" AND a "date or date".
Currently, I am using the above running one grep and then piping it to another. It works,... (3 Replies)
Discussion started by: markdjones82
3 Replies
9. Shell Programming and Scripting
can anyone tell me what the \/$ means? from
grep \/$ (8 Replies)
Discussion started by: Nick1097
8 Replies
10. Shell Programming and Scripting
is there anyway i can ask grep to only get the first line?
as in the top command line
line 1 <-- just grep this line
line 2
line 3
---------- Post updated at 04:24 PM ---------- Previous update was at 04:19 PM ----------
nvm.. found out that i can do it with
|head (12 Replies)
Discussion started by: Nick1097
12 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)