STEP 1
# Set variable
FILE=/tmp/mainfile
SEARCHFILE =/tmp/searchfile
# THIS IS THE MAIN FILE.
cat /tmp/mainfile
Interface Ethernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 100 Mbps
Full-Duplex(Full-duplex), 100 Mbps(100 Mbps)
MAC address... (6 Replies)
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
I would like to parse through some logs looking for things like exception or failed (grep -i failed). Ideal would be if it were in a menu format so someone without unix ability could just choose option 1 2 or 3 etc. If I could pass the hostname to a variable also that would be awesome, so someone... (5 Replies)
Hi Everyone,
I have a file: a.txt
a,b,c,d,6,6,6
1,2,3,d,6,6,6
4,5,6,6,6,6,6
#!/usr/bin/perl
use warnings;
use strict;
my @array = ();
### Load file into array
for my $i (split '\n', `cat /tmp/a.txt`) {
push @array, ;
}
It works. But my a.txt have 1million lines, and... (2 Replies)
Problem:
I am trying to create a menu in a menu script and I am running into an issue with the calculator portion of the script. I am first presented with the ==Options Menu== which all 5 options working correctly. Now comes the fun part. I select option 1 which takes me to my ==Calculator... (1 Reply)
I'm learning about the read command and wrote this little script to read data from a file:
readfile()
{
while read variable; do
echo $variable
done
}
readfile < File.txt
I have three lines in File.txt; each a single word. The script only echoes the first two lines and drops the... (9 Replies)
Hello,
I would like to write a bash script that would monitor a log file for a certain number of logs, let's say 500 logs and when it reaches that number to write the last log to another file. For example, I want to watch the /var/adm/messages and everytime, there is 500 new logs that are... (1 Reply)
Dears,
I am trying to write a script to read the lines from a file in AIX Server.
Below are the contents of the file. To explain, first part before = is path and second part is number.
i am trying to write the script to print the path and count where count>100. any help must be appreciated... (3 Replies)
Hi All,
I want to read the log file for last 30mins logs with time stamps.
Am using below command but, it is not working for me
awk -F - -vDT="$(date --date="30 minutes ago" "+%b %_d %H:%M:%S")" ' DT < $1' log.file >tmp.txt
log file time format is 2016-09-27 14:00:25,192
Use code... (1 Reply)
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
LEARN ABOUT DEBIAN
install-menu
install-menu(1) Debian GNU/Linux manual install-menu(1)NAME
install-menu - Process a menu method and generate the menu files for a window manager or a menu-aware application.
DESCRIPTION update-menus(1) computes the list of menu entries and passes it in turn to the menu methods in /etc/menu-methods/. The task of a menu meth-
ods is to generate menus for a specific window manager. install-menu provides a generic and customizable way to do that. The documentation
of the install-menu definition language is available in the Debian Menu manual, a local copy being available in /usr/share/doc/menu/html.
SYNOPSIS
install-menu [-vh] [--remove] <menu-method>
Read menu entries from stdin in update-menus --stdout format and generate menu files using the specified menu-method.
Normally used in menu method scripts as #! /usr/bin/install-menu.
OPTIONS -h,--help
Show the help message and exit.
--remove
Remove the menu files instead of generating them.
-v,--verbose
Output messages about what the program is doing.
COPYING
install-menu is distributed under the term of the GNU General Public License version 2, or (at your option) any later version.
AUTHOR
Written by Joost Witteveen <joostje@debian.org>. Now maintained by Bill Allombert <ballombe@debian.org>.
SEE ALSO update-menus(1), menufile(5), /usr/share/doc/menu/html
Debian Project 28 November 2005 install-menu(1)