03-08-2008
line length
hi
In my script i am having echoes which have very lage output.
echo $final
sample output:
Quote:
sql.err6:17245:Cannot Delete Temp file sql.err6:17544:Cannot Delete Temp file
etc...
The output gets printed continuosly.
Is there any way by which I can put a line break after every 25 positions?
In nutshell ,
I need a neat output of my BIG echo as below:
Quote:
sql.err6:17245:Cannot D
elete Temp file sql.err6:1
7544:Cannot Delete Tem
pfile
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I am having a funny problem with grep. When I run
grep 'expr' file.txt
things work fine. But when try to get the line number using the -n option, i.e,
grep -n 'expr' file.txt
I get a message, "grep: 0652-226 Maximum line length of 2048 exceeded."
If the line has more than... (3 Replies)
Discussion started by: hnhegde
3 Replies
2. Shell Programming and Scripting
Hi All,
I have 5 different type of lines in my file TEST1.txt
I need to perform the following conditions in the file
If first 4 characters of the line is 1010, then length of the line should be 132
If first 4 characters of the line is 9142, then length of the line should be 41
If first... (7 Replies)
Discussion started by: senthil_is
7 Replies
3. Shell Programming and Scripting
I've got a file that would have lines similar to:
12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies
4. Shell Programming and Scripting
hi all,
i'm new in unix....
i have question, sorry if it's missplace or too silly
let say i have a file name testfile.log that contains data
000001
000002
000003
aaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbb
cccccccccccccc
dddddddddddddddddd
000004
i want to make new file... (3 Replies)
Discussion started by: venven
3 Replies
5. Shell Programming and Scripting
Hi All,
Please let me know a command to parse the below line and find the words,
I have a line like this
40609 39930
In this above line the two words are separted by space.The length of this two words may differ.
I want to put 40609 in var_one and 39930 in var_two.
Eg.
Input line is ... (1 Reply)
Discussion started by: girish.raos
1 Replies
6. Shell Programming and Scripting
I am trying to write a shell scrip that can give me the line length of a record that was in EBDIC and then converted to ASCII. Everything I try reports 1 yet the length is 2000+. I have tried
echo "Line length : ${#FILE}"
echo "FILE" |awk -F, '{print NF}'
awk '{lenth(file)}'
All I can... (11 Replies)
Discussion started by: wbshrk
11 Replies
7. Programming
Is there any stabdard limitation on size of a code line in C code?
I am interesting in UNIX limitation, particulary on SUN.
Thanks! (8 Replies)
Discussion started by: alex_5161
8 Replies
8. Shell Programming and Scripting
Hi,
I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string.
But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields.
For ex:
Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies
9. Programming
How can I change the maximum length of a programming line in fortran and C (specifically in fortran 77)?
Seems the default maximum length is 72 in fortran 77.
Thanks. (4 Replies)
Discussion started by: hbar
4 Replies
10. OS X (Apple)
The vi(m) text editor...
Google is not my friend here...
I have already found out that it is possible to save a pure text file without the '0x0A' newline character at the very end of the file but I can't find anything on the next question.
I have written a raw audio file to quantised pure... (6 Replies)
Discussion started by: wisecracker
6 Replies
LEARN ABOUT OSX
test::trap::builder::systemsafe
Test::Trap::Builder::SystemSafe(3) User Contributed Perl Documentation Test::Trap::Builder::SystemSafe(3)
NAME
Test::Trap::Builder::SystemSafe - "Safe" output layer backend using File::Temp
VERSION
Version 0.2.2
DESCRIPTION
This module provides an implementation systemsafe, based on File::Temp, for the trap's output layers. This implementation insists on
reopening the output file handles with the same descriptors, and therefore, unlike Test::Trap::Builder::TempFile and
Test::Trap::Builder::PerlIO, is able to trap output from forked-off processes, including system().
See also Test::Trap (:stdout and :stderr) and Test::Trap::Builder (output_layer).
CAVEATS
Using File::Temp, we need privileges to create tempfiles.
We need disk space for the output of every trap (it should clean up after the trap is sprung).
Disk access may be slow -- certainly compared to the in-memory files of PerlIO.
If the file handle we try to trap using this backend is on an in-memory file, it would not be availible to other processes in any case.
Rather than change the semantics of the trapped code or silently fail to trap output from forked-off processes, we just raise an exception
in this case.
If there is another file handle with the same descriptor (f ex after an "open OTHER, '>&=', THIS"), we can't get that file descriptor.
Rather than silently fail, we again raise an exception.
Threads? No idea. It might even work correctly.
BUGS
Please report any bugs or feature requests directly to the author.
AUTHOR
Eirik Berg Hanssen, "<ebhanssen@allverden.no>"
COPYRIGHT & LICENSE
Copyright 2006-2012 Eirik Berg Hanssen, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.16.2 2013-08-25 Test::Trap::Builder::SystemSafe(3)