08-03-2008
How to print the output in single line
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 read line
do
cat $line | awk '/Subject/ {print}' | cut -c 1-35
cat $line | awk '/Date/ {print}' | cut -c 68-120
done
_----------------------
Thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: mitch
8 Replies
2. Shell Programming and Scripting
Hi Guys,
I have an oracle database, I am trying to query the database and route it to file.
But the records instead of coming in a single line, are coming in three lines.
Can you please help me.. in this..
sqlplus -s $SRMUserid/$SRMPassword@$SRMServer<< EOF >log.out;
select * from... (5 Replies)
Discussion started by: mac4rfree
5 Replies
3. Shell Programming and Scripting
Hello
I did do a search and the past threads doesn't really solve my issue. (using various awk commands)
I need to combine the output from java -version into 1 line, but I am having difficulties.
When you exec java -version, you get:
java version "1.5.0_06"
Java(TM) 2 Runtime... (5 Replies)
Discussion started by: flagman5
5 Replies
4. Shell Programming and Scripting
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)
Discussion started by: gvk25
7 Replies
5. Shell Programming and Scripting
Hi,
I have written this code
------------------------------------------------
# !/bin/ksh
i=0
while
do
j=$i
while
do
echo -e $j
#printf "%d",$j
j=`expr $j - 1`
done
echo
i=`expr $i + 1`
done
----------------------------------------------------
The ouput which... (2 Replies)
Discussion started by: rac
2 Replies
6. Shell Programming and Scripting
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)
Discussion started by: kamauv234
6 Replies
7. Shell Programming and Scripting
Guys, need help.
I have a file that contains something like this:
abc
def
ghi
jkl
I want to print the first and last line of the file and the output should be in a single line.
so, output should be like this:
abc jkl (3 Replies)
Discussion started by: solidhelix08
3 Replies
8. Shell Programming and Scripting
HI
I am having a flle like below .
test.txt
ssh aaaaaaa@bbbbbbbbb "head -1 /xxxxxx/yyyyyyy/yyyyyyy.sp.issuer_upd_fd"
echo /xxxxxx/yyyyyyy/yyyyyyy.sp.issuer_upd_fd
ssh aaaaaaa@bbbbbbbbb "head -1 /xxxxxx/yyyyyyy/yyyyyyy.sp.xreff_upd_gm"
echo /xxxxxx/yyyyyyy/yyyyyyy.sp.xreff_upd_gm
... (3 Replies)
Discussion started by: ptappeta
3 Replies
9. Shell Programming and Scripting
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)
Discussion started by: rpm120
4 Replies
10. UNIX for Beginners Questions & Answers
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies
LEARN ABOUT OPENSOLARIS
gnomevfs-cat
gnomevfs-cat(1) User Commands gnomevfs-cat(1)
NAME
gnomevfs-cat - print a file to standard output using the VFS system
SYNOPSIS
gnomevfs-cat URI
DESCRIPTION
gnomevfs-cat is obsolete. It has been superseded by gvfs-cat. See gvfs-cat(1).
gnomevfs-cat prints a file to standard output using the virtual file system to access the file via a URI.
OPERANDS
The following operands are supported:
URI Specifies the file location in standard URI format.
EXAMPLES
Example 1: Cat a File From a Web Server
example% gnomevfs-cat http://www.sun.com
Example 2: Cat a Local File
example% gnomevfs-cat file:///home/user/README.txt
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: NLSPATH.
EXIT STATUS
The exit value 0 is returned regardless of success or failure.
FILES
The following files are used by this application:
/usr/bin/gnomevfs-cat Executable to print a file to standard output using the VFS system
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-vfs |
+-----------------------------+-----------------------------+
|Interface stability |Obsolete Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
gnomevfs-copy(1), gnomevfs-info(1), gnomevfs-ls(1), gnomevfs-mkdir(1), gvfs-cat(1), attributes(5), environ(5)
NOTES
Written by Stephen Browne, Sun Microsystems Inc., 2004.
SunOS 5.11 14 May 2008 gnomevfs-cat(1)