10-18-2007
limiting characters upto <xyz> columns
Hi,
Recently i did some code changes in one of the text file.
During the code review,i've been asked to allign the comments
in this file to XYZ columns(say XYZ=40).
Now the problem is that this file is a huge one and
it would be really pathetic if i go ahead and do it manually.
I think there must be a better way of doing it,Can it be done
through a shell script ?
Can this variable(COLUMNS) is used for doing the same?
[amit@localhost ~]$ set|grep -i columns
COLUMNS=155 <===
~amit
9 More Discussions You Might Find Interesting
1. Forum Support Area for Unregistered Users & Account Problems
Hi,
Could you delete my account so that i can register again. My user id is ranj@tcs.
The problem is I get a mail asking to click on the link to reset the password. Once that is done, the page says - 'The reset password has been mailed to you'. I done get that mail at all.
So, please delete... (1 Reply)
Discussion started by: whyaskedhere
1 Replies
2. HP-UX
Hi,
I have searched the web and have come back with nothing that is satisfactory for what I require. SFTP is my corporations new file transfer standard. What I require is a method to lock down SFTP users to their directory (they may go to sub directories) while not restricting regular users. ... (2 Replies)
Discussion started by: Emancipator
2 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone
I am new to unix . i got struck up with small issue.
i have text file something like this
abc 'xyz' '5'
pqr 'lmn' '6'
i want to replace
abc 'xyz' '5' with abc 'tyr' '9'
but i know the key 'xyz'
based on the key 'xyz' i want to replace
please help me .
its... (3 Replies)
Discussion started by: Vijayaragavan
3 Replies
4. Shell Programming and Scripting
Hi all,
I am trying to remove the words which has XYZ as a prt of that.
My input file is something like this :
PHNDAZLF-UPS-XYZ' aaaaaaa bbbbb
ADFRTEJKS-XYZ cccccccc ddddddd rrrrrr
SGETHEHDJ-ABC-RXY' hhhhh ttttt' kkkk
FHJSKSJDKD-XXX-YYY
Output expected is :
aaaaaaa... (7 Replies)
Discussion started by: rdhanek
7 Replies
5. UNIX for Advanced & Expert Users
Hi,
I have a file with ';' delimeter which has some new line characters. How can I delete the new line characters if they are found between 1 to 10 fields.
Thanks (3 Replies)
Discussion started by: rudoraj
3 Replies
6. Shell Programming and Scripting
I have data extracted like this:
A=%123% B=%456% C=%789%
A=%111% B=%222% C=%333%
A=%777% B=%888% C=%999%
Can someone please help me with a script to remove all the % signs and get the totals for A, B and C.
So output will be:
A=1368
B=666
C=2664
Thank you! (2 Replies)
Discussion started by: tatchel
2 Replies
7. Shell Programming and Scripting
Hello Guys
Please help me with the below issue
I want to read a flat file source upto certain number of columns
Say my flat file has 30 columns but I want to read upto 25 columns only
How come the above issue can be addressed?
Thanks a lot!!!! (1 Reply)
Discussion started by: Pratik4891
1 Replies
8. Shell Programming and Scripting
I have a file like:
s_20331 803 1 1 5 1:2=0.00000000 1:3=0.00000000 1:4=0.11111111
s_20331 814 1 1 5 1:2=0.00000000 1:3=0.12611607 1:4=0.00000000I would like to remove the four characters "x:x=" from all columns containing them (in my actual file, there are 15 total columns (i.e. columns... (1 Reply)
Discussion started by: pathunkathunk
1 Replies
9. Shell Programming and Scripting
Ommit the numbers or any characters only at 7th or 8th columns after the dot (.) . Since the group column has 1 and 2 spaces.
Thanks
-rw-r--r--. 1 user1 domain users 619 2017-04-13 16:16:50.284598383 +0000 aa
drwxr-xr-x. 2 root root 6 2017-05-08... (8 Replies)
Discussion started by: invinzin21
8 Replies
LEARN ABOUT SUSE
pfsoutexr
pfsoutexr(1) General Commands Manual pfsoutexr(1)
NAME
pfsoutexr - Write images or frames in OpenEXR format
SYNOPSIS
pfsoutexr [--compression <method>] [--keep-xyz] (<file> [--frames <range>]) [<file>...]
DESCRIPTION
Use this command to write frames in OpenEXR format. Source pfs frames should be piped to the Standard Input. This command can write arbi-
trary channels to OpenEXR, color channels XYZ however are specially handled (see option keep-xyz).
All tags from pfs stream are stored in an OpenEXR file as String attributes. Tags assigned to channels are stored in the format <chan-
nel_name>:<tag_name>, so that pfsinexr can later restore tags in the appropriate channels.
The depth channel DEPTH is renamed to Z to keep compatibility with pfsinexr. If the luminance is absolute (tag LUMINANCE set to ABSOLUTE),
WhiteLuminance attribute in OpenEXR file is set to 1.
Details on the format of the pattern file names, which are used for saving multiple frames, can be found in the manual page of pfsoutppm.
--compression <method>, -c <method>
Use one the the available compression methods:
NO - no compression
RLE - run length encoding
ZIPS - zlib compression, one scan line at a time
ZIP - zlib compression, in blocks of 16 scan lines
PIZ - piz-based wavelet compression (default)
PXR24 - lossy 24-bit float compression
--keep-xyz
By default, color channels XYZ from pfs stream are converted to RGB color space and HALF format, which is a standard format for
color data in OpenEXR. Since Half format is 16-bit and floating points values used in pfs stream are 32-bit, this conversion causes
loss of precision. When keep-xyz option is specified, color channels XYZ are stored as they are without any conversion (32-bit float
XYZ channels). Note however, that most OpenEXR applications can recognize only RGB Half format images and can not handle 32-bit XYZ.
--fix-halfmax
The maximum value that can be stored in OpenEXR file is limited to 65504 if 16-bit HALF float is used (color channels are stored by
default in this format unless --keep-xyz switch is specified). If the luminance data is calibrated in absolute values (cd/m^2),
pixel values can easily exceed 65504. To avoid clamping large pixel values, pfsoutexr can rescale data to the range that is valid
for 16-bit HALF float format when --fix-halfmax switch is specified. If this switch is missing, a warning message is displayed.
Scale factor used for rescaling is stored in OpenEXR file as OpenEXR standard attribute WhiteLuminance, so that pfsinexr can later
restore the absolute values.
EXAMPLES
pfsin memorial.hdr | pfsoutexr memorial.exr
Converts from one HDR format to another
SEE ALSO
pfsout(1) pfsoutppm(1) pfsinexr(1)
BUGS
pfsinexr and pfsoutexr can not take stdin / stdout as an input/output (dash '-' instead of file name).
Please report bugs and comments on implementation to the discussion group http://groups.google.com/group/pfstools
pfsoutexr(1)