Sponsored Content
Top Forums Shell Programming and Scripting help using read in menu script to cat out lines in logs Post 302355982 by taekwondo on Thursday 24th of September 2009 08:29:04 AM
Old 09-24-2009
So easy and I tried the stupid curly brackets and every combination but the one you showed. Thanks so much.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cat file1 read line-per-line then grep -A 15 lines down in fileb

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)
Discussion started by: irongeekio
6 Replies

2. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

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)
Discussion started by: shira
21 Replies

3. Shell Programming and Scripting

Help parsing logs maybe with menu and variables?

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)
Discussion started by: taekwondo
5 Replies

4. Shell Programming and Scripting

Read files, lines into array, cat vs open

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)
Discussion started by: jimmy_y
2 Replies

5. Shell Programming and Scripting

Menu in Menu script issue

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)
Discussion started by: iDdraig
1 Replies

6. Shell Programming and Scripting

Why does my script only read two lines of a file and not the third

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)
Discussion started by: Straitsfan
9 Replies

7. Shell Programming and Scripting

script to constantly read the last 500 new logs in a log file

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)
Discussion started by: Pouchie1
1 Replies

8. AIX

Script to Read lines and print

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)
Discussion started by: sibbala
3 Replies

9. Shell Programming and Scripting

Script to read last 30mins logs

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)
Discussion started by: Prashanth.K
1 Replies

10. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

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
DH_INSTALLMENU(1)						     Debhelper							 DH_INSTALLMENU(1)

NAME
       dh_installmenu - install Debian menu files into package build directories

SYNOPSIS
       dh_installmenu [debhelperoptions] [-n]

DESCRIPTION
       dh_installmenu is a debhelper program that is responsible for installing files used by the Debian menu package into package build
       directories.

       It also automatically generates the postinst and postrm commands needed to interface with the Debian menu package. These commands are
       inserted into the maintainer scripts by dh_installdeb(1).

FILES
       debian/package.menu
	   Debian menu files, installed into usr/share/menu/package in the package build directory. See menufile(5) for its format.

       debian/package.menu-method
	   Debian menu method files, installed into etc/menu-methods/package in the package build directory.

OPTIONS
       -n, --no-scripts
	   Do not modify postinst/postrm scripts.

SEE ALSO
       debhelper(7) update-menus(1) menufile(5)

       This program is a part of debhelper.

AUTHOR
       Joey Hess <joeyh@debian.org>

11.1.6ubuntu2							    2018-05-10							 DH_INSTALLMENU(1)
All times are GMT -4. The time now is 12:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy