Thanks all for your quick reply. But these codes are not working as I expected.
All are writing the input records to output as it is.
Solution from elixir_sinari prefixed a TAB for each record except 1st.
Please help me.
hello
I have a number of lines that need to be added at the end of a file each time I add a field in another file (let's name it file2)
file2 has this format:
filed1:field2:path1:path2:path3:path...
Whenever I add a path field, I should add to file1 these lines:
<Location path1>... (0 Replies)
Hi,
I've one requirement. I have to split one comma delimited file into multiple files based on one of the column values.
How can I achieve this Unix
Here is the sample data. In this case I have split the files based on date column(c4)
Input file
c1,c2,c3,c4,c5... (1 Reply)
I can't decide if I should use AWK or PERL after pouring over these forums for hours today I decided I'd post something and see if I couldn't get some advice.
I've got a text file full of hundreds of events in this format:
Record Number : 1
Records in Seq : ... (3 Replies)
Hi All,
I'm having a hard time finding a starting point for my issue. I have a 30k line file (fspsec.txt) that I would like to parse into smaller files based on any character existing in field 1.
ACCOUNTANT LEVEL 1 (ACCT.ACCOUNTANT)
OPERATORS: DOEJO (418)
TOOLS: Branch Maintenance
... (2 Replies)
If a file has following kind of data, comma delimited
1,2,3,4
1
1
1,2,3,4
1,2
2
2,3,4
My required output must have only 4 columns with comma delimited
1,2,3,4
111,2,3,4
1,222,3,4
I have tried many awk command using ORS="" but couldnt progress (10 Replies)
Hi,
I have a requirement where I need to combine two lines in a file based on first character of each line in a file.
Please find the sample content of the file below:
Code:
_______________________
5, jaya, male, 4-5-90, single
smart
6, prakash, male, 5-4-84, married
fair
7, raghavi,... (1 Reply)
Hi,
I have a requirement where I need to combine two lines in a file based on first character of each line in a file.
Please find the sample content of the file below:
Code:
_______________________
5, jaya, male, 4-5-90, single
smart
6, prakash, male, 5-4-84, married
fair
7, raghavi,... (1 Reply)
I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :).
grep
grep -v -F -f targets.bed sort_list
grep -vFf sort_list targets
awk
awk -F, '
> FILENAME == ARGV {to_remove=1; next}
> ! ($5 in... (2 Replies)
Hi Folks,
I have a file with fields as follows which has last field in multiple lines. I would like to combine a line which has three fields with single field line for as shown in expected output. Please help.
INPUT
hname01 windows appnamec1eda_p1, ... (5 Replies)
I have an input file with
A=xyz
B=pqr
I would want the value in Second Field (xyz or pqr) updated with a value present in Shell Variable based on the value passed in the first field. (A or B )
while read line
do
NEW_VALUE = `some functionality done on $line`
If $line=First Field-... (1 Reply)
Discussion started by: infernalhell
1 Replies
LEARN ABOUT SUSE
scrl
scroll(3NCURSES)scroll(3NCURSES)NAME
scroll, scrl, wscrl - scroll a curses window
SYNOPSIS
#include <curses.h>
int scroll(WINDOW *win);
int scrl(int n);
int wscrl(WINDOW *win, int n);
DESCRIPTION
The scroll routine scrolls the window up one line. This involves moving the lines in the window data structure. As an optimization, if
the scrolling region of the window is the entire screen, the physical screen may be scrolled at the same time.
For positive n, the scrl and wscrl routines scroll the window up n lines (line i+n becomes i); otherwise scroll the window down n lines.
This involves moving the lines in the window character image structure. The current cursor position is not changed.
For these functions to work, scrolling must be enabled via scrollok.
RETURN VALUE
These routines return ERR upon failure, and OK (SVr4 only specifies "an integer value other than ERR") upon successful completion.
X/Open defines no error conditions.
This implementation returns an error if the window pointer is null, or if scrolling is not enabled in the window, e.g., with scrollok.
NOTES
Note that scrl and scroll may be macros.
The SVr4 documentation says that the optimization of physically scrolling immediately if the scroll region is the entire screen "is" per-
formed, not "may be" performed. This implementation deliberately does not guarantee that this will occur, to leave open the possibility of
smarter optimization of multiple scroll actions on the next update.
Neither the SVr4 nor the XSI documentation specify whether the current attribute or current color-pair of blanks generated by the scroll
function is zeroed. Under this implementation it is.
PORTABILITY
The XSI Curses standard, Issue 4 describes these functions.
SEE ALSO ncurses(3NCURSES), outopts(3NCURSES)scroll(3NCURSES)