Sponsored Content
Full Discussion: Text file arrangement
Top Forums UNIX for Dummies Questions & Answers Text file arrangement Post 75331 by rahul123_libra on Friday 17th of June 2005 12:22:52 AM
Old 06-17-2005
Bug See this

Try this :

cat file.txt | sed 's/$/ /g' | tr -d "\n"


Cheers
Rahul
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Data arrangement

I have these following data: Home Tom Member List 100 Yes 200 No Home Tom Member List 1 No 2 Yes Home Tome Member List 3 No 400 Yes I want my data to be consistants like this: (4 Replies)
Discussion started by: bobo
4 Replies

2. UNIX for Dummies Questions & Answers

Cell arrangement

I have a data file with hundreds of lines: I want to place a YES right below the line that say mydata....can someone please help! on the left is my the original data on the right the data format need to be: left > Right mydata > mydata yes > yesno > no mydata > mydata... (12 Replies)
Discussion started by: bobo
12 Replies

3. UNIX for Dummies Questions & Answers

Data arrangement

10 2 1 2 3 4 5 6 7 8 20 3 2 1 3 2 9 8 2 1 Need the data to be arranged: 10 2 1 5 2 6 3 7 4 8 20 3 2 1 1 2 3 8 2 9 please help! (6 Replies)
Discussion started by: bobo
6 Replies

4. UNIX for Dummies Questions & Answers

Help on file arrangement

Can anyone help me on this. I have a file that looks like this: color red green blue color pink yellow number one two gender male gender female The output would look like this: color red green blue pink yellow number one two gender male female I have over 5000 rows and i dont want... (5 Replies)
Discussion started by: kharen11
5 Replies

5. Shell Programming and Scripting

Re-arrangement of data

Dear Frineds, I have a flat file as follows ABCD ABDCWQE POIERAS ADSGASGFG GHJKFHD XBDFGHFGDH POIU IJPFG AFGJFPGOU A;DGUPGU SFSDFDSDFHDSF SDFGHSFDH I want this column to be converted into row like follows ABCD, ABDCWQE, POIERAS, ADSGASGFG, GHJKFHD, XBDFGHFGDH (6 Replies)
Discussion started by: anushree.a
6 Replies

6. Shell Programming and Scripting

directories and file arrangement in bash

im trying to write a script that will put files with different extensions into their specified directories In the directory are files of various types, i want to arrange the files on individual directories under their type. There are three distinct types of files: 1) Text documents - files with... (2 Replies)
Discussion started by: elginmulizwa
2 Replies

7. UNIX for Advanced & Expert Users

Data re-arrangement

Hi I have a huge problem to solve ASAP. Can someone please help!!! My format is arranged in this format: It has three columns. LOGIN ALIAS REC_ID A BB1 0 A ... (1 Reply)
Discussion started by: Mapilo
1 Replies

8. UNIX for Dummies Questions & Answers

Tar command to preserve the folder/file arrangement

Hi, I do have question for un tar a file. I have several 'tar'ed files. For example: SRS.tar.bz2. I was trying to untar them in a linux server using the command: tar xvjf SRS.tar.bz2 It worked perfectly. but when I open this file in my mac computer all the files are extracted into a... (7 Replies)
Discussion started by: Lucky Ali
7 Replies

9. Shell Programming and Scripting

Retreive data with arrangement

Hi all I have following part of a big file TTDS00002 Synonyms M1 receptor TTDS00002 Disease Alzheimer's disease TTDS00002 Disease Bronchospasm (histamine induced) TTDS00002 Disease Cognitive deficits TTDS00002 Disease Schizophrenia TTDS00002 Function The muscarinic acetylcholine... (2 Replies)
Discussion started by: kareena
2 Replies

10. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
curs_slk(3)						     Library Functions Manual						       curs_slk(3)

NAME
curs_slk, slk_attr_off, slk_attr_on, slk_attr_set, slk_attroff, slk_attron, slk_attrset, slk_clear, slk_color, slk_init, slk_label, slk_noutrefresh, slk_refresh, slk_restore, slk_set, slk_wset, slk_touch - Curses soft-label routines SYNOPSIS
#include <curses.h> int slk_attr_off( const attr_t attrs, void *opts ); int slk_attr_on( const attr_t attrs, void *opts ); int slk_attr_set( const attr_t attrs, short color_pair, void *opts ); int slk_attroff( const chtype attrs ); int slk_attron( const chtype attrs ); int slk_attrset( const chtype attrs ); int slk_clear( void ); int slk_color( short color_pair ); int slk_init( int fmt ); char *slk_label( int labnum ); int slk_noutrefresh( void ); int slk_refresh( void ); int slk_restore( void ); int slk_set( int labnum, const char *label, int fmt ); int slk_wset( int labnum, const wchar_t *label, int fmt ); int slk_touch( void ); LIBRARY
Curses Library (libcurses) STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: slk_attr_off, slk_attr_on, slk_attr_set, slk_attroff, slk_attron, slk_attrset, slk_clear, slk_init, slk_label, slk_noutrefresh, slk_refresh, slk_restore, slk_set, slk_wset, slk_touch: XCURSES4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
Curses manipulates the set of soft function-key labels that exist on many terminals. For those terminals that do not support soft labels, Curses takes over the bottom line of stdscr, reducing the size of stdscr and the variable LINES. Curses standardizes eight labels of up to eight characters each. To use soft labels, applications must call the slk_init routine before calling initscr or newterm. If initscr eventually uses a line from stdscr to emulate the soft labels, then fmt determines how the labels are arranged on the screen. Setting fmt to different values indicates the label arrangement as follows: Indicates a 3-2-3 arrangement. Indicates a 4-4 arrangement. The slk_set and slk_wset routines specify the text of a soft label. The labnum parameter is the label number, with values from 1 to 8. The label parameter contains the string, up to 8 characters in length, to be put on the label. A null string or a null pointer sets up a blank label. The fmt parameter can have the values 0, 1, or 2, to indicate whether the label text is left-justified, centered, or right-justi- fied, respectively, within the label. The slk_refresh and slk_noutrefresh routines correspond to the wrefresh and wnoutrefresh routines but affect labels rather than windows. The slk_label function returns the current label text, stripped of leading and trailing blanks, for the label number labnum. The slk_clear function clears the soft labels from the screen. The slk_restore function restores the soft labels to the screen after an slk_clear operation is performed. The slk_touch function forces all the soft labels to be output the next time a slk_noutrefresh operation is performed. The slk_attron, slk_attrset, and slk_attroff routines correspond to attron, attrset, and attroff, respectively, but have an effect only if soft labels are simulated on the bottom line of the screen. The slk_attr_off, slk_attr_on, and slk_attr_set routines correspond to attr_off, attr_on, and attr_set, respectively, but support the attribute constants with the WA_ prefix. The opts argument is reserved for future use. Currently, the application must provide a null pointer as opts. The slk_color routine corresponds to color_set but has an effect only if soft labels are simulated on the bottom line of the screen. NOTES
The header file <curses.h> automatically includes the header file <stdio.h>. Most applications use slk_noutrefresh because wrefresh is likely to follow soon. Since the number of columns that a wide-character string occupies is codeset specific, applications call wcwidth and wcswidth to check the number of column positions in the string before calling slk_wset. RETURN VALUES
Routines that return an integer return ERR upon failure and OK upon successful completion. The slk_label routine returns NULL on error. SEE ALSO
Functions: curses(3), curs_attr(3), curs_attr_get(3), curs_initscr(3), curs_refresh(3) Others: standards(5) curs_slk(3)
All times are GMT -4. The time now is 07:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy