Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Removing a specific word from a created list Post 302140538 by cali on Saturday 13th of October 2007 08:26:50 PM
Old 10-13-2007
You can use:
variable=" "
echo $variable > name.dat
while [ "$variable" != "finished" ]
do
echo "Please enter your name (type finished when done)"

read variable
if [ $variable != "finished" ] then
echo $variable >> name.dat
sort < name.dat > sorted_name.dat
fi
echo $variable
done

Good luck.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

List files created between specific date and time

Hi I need to write a script to list files in a directory created within specific date and time for eg list files created between Apr 25 2007 11:00 to Apr 26 2007 18:00. and then i have to count them Any suggestions pls ? (3 Replies)
Discussion started by: jazjit
3 Replies

2. Filesystems, Disks and Memory

How to list files with specific created date

Hi, Would like to ask, which command is used to list all the files for specific date (says 1st May) and its size, for all files (including its subdirectory), in a mounted NFS disk to HP-UX. I would like to check for the total files came into my disk on 1st May. Very much appreciating your... (2 Replies)
Discussion started by: Draculla
2 Replies

3. Shell Programming and Scripting

How to replace a specific word in specific column?

Hi My orginal file is like (100s of lines) id host ip location remarks 1 host1 ip1 - xxx 2 host2 ip2 - xxx 3 host3 ip3 - xxx -- -- 9 host9 ip9 - xxx I have a ref file like host1 location1 host2 location2 host3 location3 -- --... (6 Replies)
Discussion started by: ./hari.sh
6 Replies

4. UNIX for Dummies Questions & Answers

How to print line starts with specific word and contains specific word using sed?

Hi, I have gone through may posts and dint find exact solution for my requirement. I have file which consists below data and same file have lot of other data. <MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'> <MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
Discussion started by: tmalik79
11 Replies

5. Shell Programming and Scripting

bash script removing files except last one created

Hello there, can anyone please help to write a bash script that can achieve the following: 1) list files that contain a certain string in order of their creation date. Ideally the script should ask me to type in the string by hand. 2) use that list and remove all except the last one created... (2 Replies)
Discussion started by: kjartan
2 Replies

6. Shell Programming and Scripting

Fetch entries in front of specific word till next word

Hi all I have following file which I have to edit for research purpose file:///tmp/moz-screenshot.png body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: &quot;Liberation Sans&quot;; font-size: x-small; } Drug: KRP-104 QD Drug: Placebo Drug: Metformin|Drug:... (15 Replies)
Discussion started by: Priyanka Chopra
15 Replies

7. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies

8. Shell Programming and Scripting

How to print multiple specific column after a specific word?

Hello.... Pls help me (and sorry my english) :) So I have a file (test.txt) with 1 long line.... for example: isgc jsfh udgf osff 8462 error iwzr 653 idchisfb isfbisfb sihfjfeb isfhsi gcz eifh How to print after the "error" word the 2nd 4th 5th and 7th word?? output well be: 653 isfbisfb... (2 Replies)
Discussion started by: marvinandco
2 Replies

9. Shell Programming and Scripting

Search for a specific word and print only the word from the input file

Hi, I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file. Ex: $ cat "sample.log" I am searching for a word which is present in this file We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies

10. Shell Programming and Scripting

Files created on specific time

Hello Gurus, I am facing one issue to get a file for a specific time. There are about 300 files created between 6.30 pm to 7.15 pm everyday. Now I wanted only the file which is created on 6.45pm. No other files required. I have used "find" command to get the files, but not getting the expected... (3 Replies)
Discussion started by: pokhraj_d
3 Replies
ARPSNMP(8)						      System Manager's Manual							ARPSNMP(8)

NAME
arpsnmp - keep track of ethernet/ip address pairings SYNOPSIS
arpsnmp [ -d ] [ -f datafile ] file [ ... ] DESCRIPTION
Arpsnmp keeps track for ethernet/ip address pairings. It syslogs activity and reports certain changes via email. Arpsnmp reads information from a file (usually generated by snmpwalk(1)). The -d flag is used enable debugging. This also inhibits mailing the reports. Instead, they are sent to stderr. The -f flag is used to set the ethernet/ip address database filename. The default is arp.dat. Note that an empty arp.dat file must be created before the first time you run arpsnmp. REPORT MESSAGES
(See the arpwatch(8) man page for details on the report messages generated by arpsnmp(8).) FILES
/usr/operator/arpwatch - default directory arp.dat - ethernet/ip address database ethercodes.dat - vendor ethernet block list SEE ALSO
arpwatch(8), snmpwalk(1), arp(8) AUTHORS
Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA. The current version is available via anonymous ftp: ftp://ftp.ee.lbl.gov/arpwatch.tar.gz BUGS
Please send bug reports to arpwatch@ee.lbl.gov. Attempts are made to suppress DECnet flip flops but they aren't always successful. 4th Berkeley Distribution 17 September 2000 ARPSNMP(8)
All times are GMT -4. The time now is 11:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy