11-09-2009
Just a quick thank-you both for your help.
Have now incorporated into the one process and am using 'for word in...' and the alternative 'while IFS' successfully
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it seems I am missing something and not getting the expected results... Here is the code :
#!/bin/ksh... (2 Replies)
Discussion started by: Vaddadi
2 Replies
2. Shell Programming and Scripting
hi,
I'm using HP unix tru64 & Win XP.
i'm download a file from winxp to unix using ftp.
how to know whether a remote file is currently being used by the process or not? (my loaction unix server) (7 Replies)
Discussion started by: Tlg13team
7 Replies
3. Shell Programming and Scripting
Hi,
Here is the output of lpstat. I would like to read value of Queue which is(abxxxxb1)and status that is DOWN in first line. i dont care what is in second line. any one can help me.thanks
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- ---------... (5 Replies)
Discussion started by: sagii
5 Replies
4. Shell Programming and Scripting
Hi,
I am doing :
while read line
do
printf "%s\n" ${line}
done <datafile.txt
but I am not getting each single line from the data file assigned to the variable line (but only tokens/fields at a time). I also tried while IFS= read -r lineI want the whole line assigned or read into the... (2 Replies)
Discussion started by: shri_nath
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a situation where I need to read a variable from another file. But the problem is that the variable in the other file is starting with $.
E.g.
file1:
$var1=out
temp_ss.sh:
. file1
echo "Print : $var1"
It works fine if the file1 is having var1=out (note that it is... (6 Replies)
Discussion started by: shash
6 Replies
6. Shell Programming and Scripting
Hello,
I need to read a variable value from script.
Below is the scenario
I am reading a value from an external file say a.txt
a.txt:
Jan
Feb
Mar
I need the corresponding value of the months in in numerics such as Jan -->1,
Feb-->2 etc.
I have this mapping in another file... (1 Reply)
Discussion started by: aixjadoo
1 Replies
7. Shell Programming and Scripting
HI all,
I have a parameter file with entries like
$$Name =Abhinav
$$CUTOFF_DATE = 11/11/2209
I am reading a variable from this file using a awk command like :
var2=`awk -F"" "/CUTOFF_DATE/{f=$1;}{print f;}" InputFIleName`
but facing an error like
awk: cmd. line:1:... (3 Replies)
Discussion started by: abhinav192
3 Replies
8. Shell Programming and Scripting
Hi folks,
I'm using bash and would like to do the following. I would like to read some values from the file and store it in the variable and use it.
My file is 1.txt and its contents are
VERSION=5.6
UPDATE=4
I would like to read "5.6" and "4" and store it in a variable in shell... (6 Replies)
Discussion started by: scriptfriend
6 Replies
9. Shell Programming and Scripting
I need to know how the the string constant from Input File should be read and provide as input data for the script .
INPUT FILE
CONST VARIABLE
myname=/root/dir/syslog/myname1
myname=/root/dir/syslog/myname2
myname=/root/dir/syslog/myname3
urname=/root/dir/syslog/urname1... (6 Replies)
Discussion started by: baraghun
6 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I have a text file named "foreach.txt" which reads like ---
foreach cal ( 1 2 3 4 5 )
I am using a simple script which looks like ---
#!/bin/tcsh
foreach cal (1 2 3 4 5)
echo "$cal"
end
Is it possible to modify the script in such a way that instead of writing
foreach cal (1... (6 Replies)
Discussion started by: Indra2011
6 Replies
LEARN ABOUT DEBIAN
flow-rptfmt
flow-rptfmt(1) General Commands Manual flow-rptfmt(1)
NAME
flow-rptfmt -- Format the output of flow-report in ASCII or HTML
SYNOPSIS
flow-rptfmt [-hHnp] [-a alarm_time] [-f format] [-F fields] [-m max_lines] [-s sort_field]
DESCRIPTION
The flow-rptfmt utility processes the CSV output of flow-report into formatted ASCII or HTML. Sorting, maximum display lines, field fil-
ter, header display, and name substitution are supported during post processing. Additionally an alarm can be set for use in CGI scripts
to limit the CPU time of formatting.
OPTIONS
-a alarm_time
Exit after alarm_time seconds.
-f ascii|html
Set output format. Defaults to ASCII.
-F display_fields
Limit columns to display_fields
-h Help.
-H Display header information.
-m max_lines
Limit rows to max_lines.
-n Enable symbol table lookups.
-p Display in percent total form.
-s sort_field
Sort on sort_field. Prepend with + for ascending, - for descending sort.
EXAMPLES
Format the output of daily-ip-protocol.txt in ASCII. Display the ip-protocol and octets fields in percent total format with symbols.
Limit output to top 5 sorted by octets.
cat daily-ip-protocol.txt | flow-rptfmt -fascii -Fip-protocol,octets -p -n -m5
BUGS
Sorting could be faster. Percent totals could be faster. May not work with flow-report prior to 0.68.
AUTHOR
Mark Fullmer maf@splintered.net
SEE ALSO
flow-tools(1)
flow-rptfmt(1)