Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Grabbing a value from an output file Post 302226787 by Annihilannic on Tuesday 19th of August 2008 11:52:37 PM
Old 08-20-2008
Or using awk alone:

Code:
awk '/Parameter Name : BATCHES_UPDATED/ { getline ; print $3 }' output.file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grabbing lines out of a file based on a date

Hello, I'm new to this forum and am not exactly sure where to post this question, so I'll start here. I'm looking for a command or simple script that will read in a large flat file (contains 2005 data) and will output a new file based on a quarter. Within each row, position 87-90 is a julian... (2 Replies)
Discussion started by: bsp18974
2 Replies

2. Shell Programming and Scripting

script grabbing cvs file .....

how do I write a script to checkout a file in cvs and cat the file into a file in my home directory Commands are cd /home/smr/sandbox cvsroot choose option 1 cvs co filename cat filename > /home/smr/newfilename Thank you! (4 Replies)
Discussion started by: llsmr777
4 Replies

3. Shell Programming and Scripting

Sed grabbing the last line of a file

I can grab the first line w/ sed how do you grab the last line of a file? (2 Replies)
Discussion started by: xgringo
2 Replies

4. Shell Programming and Scripting

grabbing filename from text file....should be easy!

Quick question...I'm trying to grab the .tif file name from this output from our fax server. What is the best way i can do this in a bash script? I have been looking at regular expressions with bash or using awk but having some trouble. thanks! The only output i want is... (5 Replies)
Discussion started by: kuliksco
5 Replies

5. Shell Programming and Scripting

Grabbing value from command output and monitoring for changes

Hi all, Very new to shell scripting so appreciate some help! There is a process count that I need to monitor, I have the AIX command that gives this value and I've cleaned it up with grep/awk so it only spits out the value I'm interested in: echo "psc -i 10050 -s RELOAD_SERVICE" | tmadmin... (14 Replies)
Discussion started by: monty77
14 Replies

6. Shell Programming and Scripting

Kornshell grabbing value from file

I have a script right now that I run a command which outputs just one word to a file. Well I need to grab that value and use it in another line of code so... touch oraclesid.txt echo $ORACLE_SID > oraclesid.txt #grab that value sqlplus v500/v500@<value> how do I grab that value from the... (6 Replies)
Discussion started by: Blogger11
6 Replies

7. Shell Programming and Scripting

Inquiry on Grabbing info from file.

Here is another script I am trying to customize currently, this script is used to send me disk space information, but at the moment I have to enter all the servers in manually SERVER= "xxx bbb ccc" ect.. how can I script it so that the servers are called off a txt file versus me entering all... (1 Reply)
Discussion started by: NelsonC
1 Replies

8. Shell Programming and Scripting

Grabbing a chunk of text from a file

Hi, I have a Report.txt file. Say the contents of this file are : 1 2 3 4 5 7 df v g gf e r dfkf lsdk dslsdklsdk Report Start: xxxxxxdad asdffsdfsdfsdfasfasdffasdf sadfasdfsadffsfsdf Report End. sdfasdfasdf sdfasfdasdfasdfasdfasdf sadfasdfsdf I need to grab from Report Start... (3 Replies)
Discussion started by: mrskittles99
3 Replies

9. Shell Programming and Scripting

Grabbing IP and zonename from multiline 'ifconfig' output

Hi There, I have a Solaris server that has a bunch of zones configured and I am trying to write a script that will take all interfaces other than the loopback ones (e.g. lo0:3 etc) and present them so that I can easily determine the zone that owns the IP So in the case of the following... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

10. Shell Programming and Scripting

Grabbing value from file and run command in ``

Hi ALL, How can I make a script take data from a file and execute the commands within `` in the file n put that that in a variable? for i in `cat file` do file=`grep -i key file` cp ${file} test done file /tmp/`date +y`log /tmp/unix`date +y`log (1 Reply)
Discussion started by: 3junior
1 Replies
LOGSAVE(8)						      System Manager's Manual							LOGSAVE(8)

NAME
logsave - save the output of a command in a logfile SYNOPSIS
logsave [ -asv ] logfile cmd_prog [ ... ] DESCRIPTION
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will also be written to standard output. If cmd_prog is a single hyphen ('-'), then instead of executing a program, logsave will take its input from standard input and save it in logfile logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to /var/log. OPTIONS
-a This option will cause the output to be appended to logfile, instead of replacing its current contents. -s This option will cause logsave to skip writing to the log file text which is bracketed with a control-A (ASCII 001 or Start of Header) and control-B (ASCII 002 or Start of Text). This allows progress bar information to be visible to the user on the console, while not being written to the log file. -v This option will make logsave to be more verbose in its output to the user. AUTHOR
Theodore Ts'o (tytso@mit.edu) SEE ALSO
fsck(8) E2fsprogs version 1.44.1 March 2018 LOGSAVE(8)
All times are GMT -4. The time now is 12:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy