Output to file print as single line, not separate line
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:
I need it to save to file as this:
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz
Last edited by rbatte1; 11-16-2016 at 05:50 AM..
Reason: Added CODE tags
Hi
I have a file with contents like
china
india
france
japan
italy
germany
.
.
.
.
etc....
I want the output as
china|india|france|japan|italy|germany|.|.|. (3 Replies)
hey gents,
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Hi,
Please suggest, how to get the output of below script in single line, its giving me in different lines
______________________
#!/bin/ksh
export Path="/abc/def/ghi";
Home="/home/psingh/prat";
cd $Path;
find $Path -name "*.C#*" -newer "abc.C#1234" -print > $Home
cat $Home | while... (1 Reply)
Hello UNIX experts,
I have 124 text files in a directory. I want to extract the 45678th line of all the files sequentialy by file names. The extracted lines should be printed in the output file on seperate lines.
e.g. The input Files are one.txt, two.txt, three.txt, four.txt
The cat of four... (1 Reply)
I have a large 3479 line .csv file, the content of which looks likes this:
1;0;177;170;Guadeloupe;x
2;127;171;179;Antigua and Barbuda;x
3;170;144;2;Umpqua;x
4;170;126;162;Coos Bay;x
...
1205;46;2;244;Unmak Island;x
1206;47;2;248;Yunaska Island;x
1207;0;2;240;north sea;x... (5 Replies)
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Hi all,
I have a single line output like below
echo $ips
10.26.208.28 10.26.208.26 10.26.208.27
want to convert above single line output as below format. Pls advice how to do ?
10.26.208.28
10.26.208.26
10.26.208.27
Regards
Kannan (6 Replies)
I need to match two patterns in a log file and need to get the next line of the one of the pattern (out of two patterns) that is matched,
finally need to print these three values in a single line.
Sample Log:
2013/06/11 14:29:04 <0999> (725102) Processing batch 02_1231324
2013/06/11... (4 Replies)
performing this code to read from file and print each character in separate line
works well with ASCII encoded text
void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc = getc (fp);
if (cc == EOF)
break;
printf ("%c\n", cc);
}
}
int
main(int... (1 Reply)
I am trying to use awk to find all the $3 values in file2 that are between $2 and $3 in file1. If a value in $3 of file2 is between the file1 fields then it is printed along with the $6 value in file1. Both file1 and file2 are tab-delimited as well as the desired output. If there is nothing to... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT CENTOS
tabs
tabs(1) General Commands Manual tabs(1)NAME
tabs - set tabs on a terminal
SYNOPSIS
tabs [-v[n]] [-ahuUV] file...
DESCRIPTION
The tabs program clears and sets tab-stops on the terminal. This uses the terminfo clear_all_tabs and set_tab capabilities. If either is
absent, tabs is unable to clear/set tab-stops. The terminal should be configured to use hard tabs, e.g.,
stty tab0
OPTIONS
General Options
-Tname
Tell tabs which terminal type to use. If this option is not given, tabs will use the $TERM environment variable. If that is not set,
it will use the ansi+tabs entry.
-d The debugging option shows a ruler line, followed by two data lines. The first data line shows the expected tab-stops marked with
asterisks. The second data line shows the actual tab-stops, marked with asterisks.
-n This option tells tabs to check the options and run any debugging option, but not to modify the terminal settings.
The tabs program processes a single list of tab stops. The last option to be processed which defines a list is the one that determines the
list to be processed.
Implicit Lists
Use a single number as an option, e.g., "-5" to set tabs at the given interval (in this case 1, 6, 11, 16, 21, etc.). Tabs are repeated up
to the right margin of the screen.
Use "-0" to clear all tabs.
Use "-8" to set tabs to the standard interval.
Explicit Lists
An explicit list can be defined after the options (this does not use a "-"). The values in the list must be in increasing numeric order,
and greater than zero. They are separated by a comma or a blank, for example,
tabs 1,6,11,16,21
tabs 1 6 11 16 21
Use a '+' to treat a number as an increment relative to the previous value, e.g.,
tabs 1,+5,+5,+5,+5
which is equivalent to the 1,6,11,16,21 example.
Predefined Tab-Stops
X/Open defines several predefined lists of tab stops.
-a Assembler, IBM S/370, first format
-a2 Assembler, IBM S/370, second format
-c COBOL, normal format
-c2 COBOL compact format
-c3 COBOL compact format extended
-f FORTRAN
-p PL/I
-s SNOBOL
-u UNIVAC 1100 Assembler
PORTABILITY
X/Open describes a +m option, to set a terminal's left-margin. Very few of the entries in the terminal database provide this capability.
The -d (debug) and -n (no-op) options are extensions not provided by other implementations.
Documentation for other implementations states that there is a limit on the number of tab stops. While some terminals may not accept an
arbitrary number of tab stops, this implementation will attempt to set tab stops up to the right margin of the screen, if the given list
happens to be that long.
SEE ALSO tset(1), infocmp(1M), curses(3X), terminfo(5).
This describes ncurses version 5.9 (patch 20130511).
tabs(1)