I'm appending header and trailer record for a binary file using
echo "$header" > filename
cat oldfilename >> filename
echo "$trailer" >> filename
The echo is introducing newline character after header and trailer.Please let me know is there any possibility to get rid of newline character. (2 Replies)
HI i am having a file this
(sys19:pnlfct:/pfact/temp>) cat temp_sand
1234567890
1234567890
1234567890
1234567890
I want to make this file as
(sys19:pnlfct:/pfact/temp>) cat temp_sand
1456789023
1456789023
1456789023
1456789023
just take the 2nd and 3rd position and put it... (5 Replies)
How can I remove the last character from each line of a file?
This must be done without "funny" characters, as I want to transfer the code to/from Windows.
Any ideas? (17 Replies)
hi
Someone can give me some clue or script in writing the below requirement
I am having 5 or 10 files of unix files which contain ^M charactes.
First we have to find ^M character and concat the line where it has broken and then we have to remove the ^M character from the uxix... (11 Replies)
I need help removing the last character of every line if it is a certain character. For example I need to get rid of a % character if it is in the last position.
Input:
aaa%
%bbb
ccc
d%dd%
Output should be:
aaa
%bbb
ccc
d%dd
I tried this but it gets rid of all of the % characters.... (5 Replies)
Hi,
I want to read the file from nth line (where n is an integer) to until I encounter @ char.
Can any one please help me how to do this?
Thanks. (3 Replies)
Hi,
I have a file like this (about 8 columns in total, this being the 2nd column)
gi_49482297_ref_YP_039521.1_
gi_49482297_ref_YP_039521.1_
gi_49482315_ref_YP_039539.1_
gi_49482315_ref_YP_039539.1_I want to remove the _ at the end of the line.
And at later stages I would want to replace the... (5 Replies)
Hi All,
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
do
# Process file
echo "File Name=" $file
#l_fileName="${file##*/}"
... (19 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT OSF1
curs_scroll
curs_scroll(3) Library Functions Manual curs_scroll(3)NAME
curs_scroll, 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 );
LIBRARY
Curses Library (libcurses)
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
scrl, wscrl, scroll: XCURSES4.2
Refer to the standards(5) reference page for more information about industry standards and associated tags.
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 is scrolled at the same time.
The scrl and wscrl routines, for positive n, scroll the current or specified window up n lines (line i+n becomes line i); otherwise, these
routines scroll the window down n lines. This operation involves moving the lines in the window character-image structure. The routines do
not change the current cursor position.
For the scroll, scrl, and wscrl functions to work, the scrollok option must be enabled.
NOTES
The header file <curses.h> automatically includes the header file <stdio.h>.
Note that scrl may be a macro.
RETURN VALUES
All routines return the integer ERR upon failure and OK upon successful completion.
SEE ALSO
Functions: curses(3), curs_outopts(3)
Others: standards(5)curs_scroll(3)