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 OPENSOLARIS
print
print(1) User Commands print(1)NAME
print - shell built-in function to output characters to the screen or window
SYNOPSIS
ksh
print [-Rnprsu [n]] [arg]...
ksh93
print [-Renprs] [-f format] [-u fd] [string...]
DESCRIPTION
ksh
The shell output mechanism. When no options are specified, or when an option followed by ' a - is specified, or when just - is specified,
the arguments are printed on standard output as described by echo(1).
ksh93
By default, print writes each string operand to standard output and appends a NEWLINE character.
Unless, the -r, -R, or -f option is speciifed, each character in each string operand is processed specially as follows:
a Alert character.
Backspace character.
c Terminate output without appending NEWLINE. The remaining string operands are ignored.
E Escape character (ASCII octal 033).
f FORM FEED character.
NEWLINE character.
Tab character.
v Vertical tab character.
\ Backslash character.
x The 8-bit character whose ASCII code is the 1-, 2-, or 3-digit octal number x.
OPTIONS
ksh
The following options are supported by ksh:
-n Suppresses new-line from being added to the output.
-r-R Raw mode. Ignore the escape conventions of echo. The -R option prints all subsequent arguments and options other than -n.
-p Cause the arguments to be written onto the pipe of the process spawned with |& instead of standard output.
-s Cause the arguments to be written onto the history file instead of standard output.
-u [ n ] Specify a one digit file descriptor unit number n on which the output is placed. The default is 1.
ksh93
The following options are supported by ksh93:
-e Unless -f is specified, process sequences in each string operand as described above. This is the default behavior.
If both -e and -r are specified, the last one specified is the one that is used.
-f format Write the string arguments using the format string format and do not append a NEWLINE. See printf(1) for details on how to
specify format.
When the -f option is specified and there are more string operands than format specifiers, the format string is reprocessed
from the beginning. If there are fewer string operands than format specifiers, then outputting ends at the first unneeded for-
mat specifier.
-n Do not append a NEWLINE character to the output.
-p Write to the current co-process instead of standard output.
-r Do not process sequences in each string operand as described above.
-R
If both -e and -r are specified, the last one specified is the one that is used.
-s Write the output as an entry in the shell history file instead of standard output.
-u fd Write to file descriptor number fd instead of standard output. The default value is 1.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 Output file is not open for writing.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO echo(1), ksh(1), ksh93(1), printf(1), attributes(5)SunOS 5.11 27 Mar 2008 print(1)