Ok when I run this and search by key word "Brittney", "Morris", or "britm" nothing is removed
Sample Code:
------------
#!/bin/sh
echo Enter a userid or name to search for and remove:
read wrd
sed -e "`grep -n -w $wrd ~/test | awk -F':' '{printf \"%dd;\",$1}'`" ~/test
Problem:
--------
I am trying to remove a userid and name from a file once the user has specified the userid or name to remove.
Sample Code:
------------
#!/bin/sh
echo Enter a userid or name to search for and remove:
read wrd
grep -w $wrd ~/test | cut $wrd
Notes:
------
Im using grep -w cause...
I am trying to prompt the user to enter info then once they have entered the info for the fields then >> the new info to an exisiting file.
Sample Code:
------------
echo Enter a userid:$1
echo Enter the first name:$2
echo Enter the last name:$3
$1+$2+$3 >> users.ref
I want to keep the...
Has anyone here installed OpenBSD + Windows XP on the same disk? If so could u give me some pointers on how to install, things to look out for, what not to do, stuff like that plz.
Also is there any bugs or known exploits which havent been resolved as of late and is OpenBSD 3.4 a better choice...
I am working on a program which test to see if a number is perfect but before I can ensure that I am testing for perfect numbers properly. I have to compile the code to see if the test results are correct.
#include <stdio.h>
int readud(int pVal, int perfect() ) // Read User Data
{
printf...
How can I filter out certian lines from a file? I cant use tail or head since I am not after the first or last portions of the file but specific lines say 21-30 and 33,36,40 and so on how would I filter by the line and by a group like 21-30.
Quick question why is it none of the members here support the GnuPG version of PG?
@jvvolkman - the GnuPG version is a command line version and is free not to meantion it supports SDA after a bit of work on your part.
This code returns an error:sort -dg "word2sort for" /etc/file >> test
But if I were to sort the contents of "file" as so
sort -dg /etc/file >> test[\code]
There would be no problem.
My goal is to sort "file" only returning the lines containing the text which I am after.
So as an example I...
I am tring to install " gnupg-w32cli-1.2.4 " for windows. I have followed the directioNs in the readme but am still experiencing some problems. My regfile reads as follows:
-----------------------------------------------------------
REG-FILE CODE...
I am trying to concentrate three files and create a newfile containing the output
SAMPLE CODE:
test >> test1 >> test2 > newfile
This results with only "test" being added to file "newfile"
SAMPLE CODE:
test > test1 > test2 > newfile
Same result
ALSO...ne know how to view file permissions?
1. How do I create an empty line and pass it on to a file so there is a space as if I had hit return?
echo "text" >> test
echo "" >> test #line which I want to be a space
echo "text" >> test
2. How can I create an empty or zero byte file? I have been trying to use cat for this but it stops...
How do I append a line of text to a file using "cat" or some other command?
mkdir ~/tmp
cat > ~/tmp/test
cat "This text to be written to file 'test'." >> test
cat "second line of text to be added" >> test
cat "emptyline" >> test
date >> test
ls -al >> test
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.