05-10-2005
Line wrapping problem when using awk
I am fairly new at this,
I wrote a awk program to give me some summary information about a file. At the end of the program I want to print some variables but for some reason it keeps wrapping the last variable on a new line in the output file.
Here is the print command
print "99", file_id, file_status, file_rec_total, rec_count, file_hash_total,line_rec_total
I get all the variables in the output but the last one on a different line:
99 GEACPENSION PASSED 14304 14304 1517113.23
1517113.23
Is it because of the number of variables? Is there a way to set up a no wrap rule?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
We want to protect our ksh scripts from our customers.We don't want to let them the option to viewor modify the scripts.
Is there a way ro wrap a ksh script?
Thanks in advance,
Nir (2 Replies)
Discussion started by: nir_s
2 Replies
2. Shell Programming and Scripting
I have a set of files of multi-line records with the records separated by a blank line. I needed to add a record number to the front of each line followed by a colon and did the following:
awk 'BEGIN {FS = "\n"; RS = ""}{for (i=1; i<=NF; i++)print NR,":",$i}' ~/Desktop/data98-1-25.txt >... (3 Replies)
Discussion started by: RacerX
3 Replies
3. UNIX for Dummies Questions & Answers
By default, we use ksh (88) as our shell. I prefer bash, so I added this line to my .profile:
exec bash -o viI also added this to my .bashrc?:
#***********************************************
#These are important tweaks specific to BASH:
#***********************************************... (1 Reply)
Discussion started by: mrwatkin
1 Replies
4. UNIX for Dummies Questions & Answers
I am very frustrated with this. I've added the following into my .profile and .bashrc:
#this one makes sure that long commands strings line wrap to the next line
&& return
#instead of wrapping onto the start of the same line.
shopt -s checkwinsize
However, it just never works for me.... (7 Replies)
Discussion started by: mrwatkin
7 Replies
5. Shell Programming and Scripting
Hi,
After looking on different forums, I'm still in trouble to parse a parameters line received in KSH.
$* is equal to "/AAA:111 /BBB:222 /CCC:333 /DDD:444"
I would like to parse it and be able to access anyone from his name in my KSH after.
like
echo myArray => display 111
... (1 Reply)
Discussion started by: RickTrader
1 Replies
6. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
7. Shell Programming and Scripting
Hi,
I want to wrap the lines if a line starts with number. I tried the following sed command, but I do not get the required output. It is replacing the first number.
Can some one please help me on this?
Command I used
sed -e :a -e '$!N;s/\n//;ta' -e 'P;D' testfile
I/P file:... (2 Replies)
Discussion started by: christineidanny
2 Replies
8. Shell Programming and Scripting
I have a script which generates env setup xml file by reading path.It read the path and checks if there is any file/dir present recurseively.
If a file is found under sub directory then it will read the file and the values from the file are passed to generate xml format.
Problem is if i have a... (0 Replies)
Discussion started by: Optimus81
0 Replies
9. Shell Programming and Scripting
Hi guy,
I have an output command like this:
Policy Name: NBU.POL.ORA.PROD
Policy Type: Oracle
Active: yes
HW/OS/Client: Linux RedHat2.6 node1
Iclude: /usr/openv/netbackup/scripts/backup_ora1.bash
I would like to parse the... (1 Reply)
Discussion started by: luca72m
1 Replies
10. UNIX for Advanced & Expert Users
Today I needed to take a look through a load of large backup files, so I wrote the following line to find them, order them by size, and print the file sizes in GB along with the filename. What happened was odd, the output was all as expected except for the first output line which had the filename... (4 Replies)
Discussion started by: gencon
4 Replies
LEARN ABOUT DEBIAN
picosat
PICOSAT(1) General Commands Manual PICOSAT(1)
NAME
picosat - SAT solver with proof and core support
SYNOPSIS
picosat [options] input-file
DESCRIPTION
This manual page documents briefly the picosat command.
picosat is a SAT solver with proof and core capabilities. Use the picosat.trace binary to actually use these capabilities (these incur some
overhead).
OPTIONS
-h Show summary of options.
--version
print version and exit
--config
print build configuration and exit
-v enable verbose output
-f ignore invalid header
-n do not print satisfying assignment
-p print formula in DIMACS format and exit
-i <0/1>
force FALSE respectively TRUE as default phase
-a <lit>
start with an assumption
-l <limit>
set decision limit
-s <seed>
set random number generator seed
-o <output>
set output file
-t <trace>
generate compact proof trace file (use picosat.trace, see above).
-T <trace>
generate extended proof trace file (use picosat.trace, see above).
-r <trace>
generate reverse unit propagation proof file (use picosat.trace, see above).
-c <core>
generate clausal core file in DIMACS format (use picosat.trace, see above).
-V <core>
generate file listing core variables
-U <core>
generate file listing used variables
AUTHOR
picosat was written by Armin Biere <biere@jku.at>.
This manual page was written by Michael Tautschnig <mt@debian.org>, for the Debian project (but may be used by others).
February 5, 2010 PICOSAT(1)