Sponsored Content
Top Forums UNIX for Dummies Questions & Answers text formating/Text space padding Post 76557 by rahul123_libra on Wednesday 29th of June 2005 06:45:39 AM
Old 06-29-2005
use this

echo " Name Time Size "

Inside the for loop try this :-

ls -lrt $file | awk '{print $9; print $8; print $5}' | tr '\n\ ' '
echo " "

where file is the file retrieved from the loop
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Formating text from a script into a log file

Using a for loop I am able to get the following log file below. I would like o change the format a bit as is indicated lower down. I have looked at awk and sed but somehow is not getting any joy. I am a bit new to ksh scripting. Please assist. This is the format of my current log file after the... (1 Reply)
Discussion started by: hugow
1 Replies

2. Forum Support Area for Unregistered Users & Account Problems

Formating mailx text file for Lotus Notes users

We use AIX mailx or sendmail. How can I format a text file so that lotus notes users can see diferent fonts and highlighting. Or can a gif file (company logo..) be sent along with a text file and the Lotus notes user would see the logo and text displayed at the same time and not as an attachment? (0 Replies)
Discussion started by: lidoiwo
0 Replies

3. UNIX for Dummies Questions & Answers

batch formating filenames with zero padding

My little script for producing pseudo random file names works OK; but I need the file names to be formatted with zero padding, probably %05d here's the script so far #!/bin/bash ls *.jpg > list for i in `cat list` do rnd=$RANDOM mv "$i" "$rnd" done I've been trying printf but can't... (2 Replies)
Discussion started by: platz
2 Replies

4. Shell Programming and Scripting

TEXT formating using script

Dear All I am facing problem while extracting data from below mention input file. My op should be like this.Required field display in red in file. Request you all to help. OP: RXOTX-46-5 1B4 RXOTX-46-4 2B5 INPUT FILE: <RXMFP:MO=RXOTX-46-5; RADIO X-CEIVER ADMINISTRATION... (4 Replies)
Discussion started by: jaydeep_sadaria
4 Replies

5. Shell Programming and Scripting

Text formating

Dear all I had input file as mention below and want op as mention. Kindly let me knw possible ways. Regards Jaydeep INPUT: RXOTX-48-1 2A 34 2B 35 RXOTX-499-2 2C 32 RXOTX-4-1 2D 23 OUTPUT: (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

6. Shell Programming and Scripting

Text formating issue

Hi, I am trying to format the output of my script in a tabular format using the html code in my shell script. I am using html code for the first time in a shell script.I am trying to execute this script in Ksh but it is not getting executed. Can you please help me in figuring this out.... (6 Replies)
Discussion started by: isaacsam
6 Replies

7. Shell Programming and Scripting

fixed length text file padding issues in AIX

Hi, I have a fixed length text file that needs to be cut into individual files in aix and facing padding issues. If I have multiple blank spaces in the file it is just making it one while cutting the files.. Eg:- $ - blank space filename:file.txt ... (2 Replies)
Discussion started by: techmoris
2 Replies

8. UNIX for Dummies Questions & Answers

Converting a text file with irregular spacing into a space delimited text file?

I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Discussion started by: evelibertine
5 Replies

9. Shell Programming and Scripting

Text Formating or Modifying

Hi Experts, I have a text exactly like below in a file: id item_id item_date prin_mkt_val --------------------------- --------------------------- ------------------------------- ------------------------ ... (1 Reply)
Discussion started by: apatil65
1 Replies

10. UNIX for Dummies Questions & Answers

Changing only the first space to a tab in a space delimited text file

Hi, I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
XmTextGetSubstringWcs(3X)												 XmTextGetSubstringWcs(3X)

NAME
XmTextGetSubstringWcs - A Text function that retrieves a portion of a wide character internal text buffer SYNOPSIS
#include <Xm/Text.h> int XmTextGetSubstringWcs (widget, start, num_chars, buffer_size, buffer) Widget widget; XmTextPosition start; int num_chars; int buffer_size; wchar_t *buffer; DESCRIPTION
XmTextGetSubstringWcs retrieves a copy of a portion of the internal text buffer of a Text widget that is stored in a wide character format. The function copies a specified number of characters from a given start position in the internal text buffer into a buffer provided by the application. A NULL terminator is placed at the end of the copied data. Specifies the Text widget ID. Specifies the beginning character position from which the data will be retrieved. This is an integer number of characters from the beginning of the text buffer. The first character position is 0. Specifies the number of wchar_t characters to be copied into the provided buffer. Specifies the size of the sup- plied buffer as a number of wchar_t storage locations. The minimum size is num_chars + 1. Specifies the wide character buffer into which the internal text buffer will be copied. For a complete definition of Text and its associated resources, see XmText(3X). RETURN VALUE
The function was successful. The function failed because it was unable to copy the specified number of characters into the buffer pro- vided. The buffer size may be insufficient. The contents of buffer are undefined. The requested number of characters extended beyond the internal buffer. The function copied characters between start and the end of the widget's buffer and terminated the string with a NULL terminator; fewer than num_chars characters were copied. SEE ALSO
XmText(3X), XmTextGetSubstring(3X) XmTextGetSubstringWcs(3X)
All times are GMT -4. The time now is 10:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy