Edited to note: I just noticed that the OP wants to have the data string "340806@osiris.fr.ft" transposed in the output, as "osiris.fr.ft#340806". That makes the above incorrect, and provides a more interesting challenge.
---------- Post updated at 08:53 AM ---------- Previous update was at 07:50 AM ----------
OK, here's another pass that handles the field with the @ correctly:
Last edited by malcolmpdx; 06-16-2010 at 11:55 AM..
This User Gave Thanks to malcolmpdx For This Post:
i have a txt file in which it contains some lines each line contains some 350-400 characters
but when i read the file line by line in ksh it is telling the max characters in each line is between 100-127 characters
in each line it contains some values with some spaces in between
when i try to... (2 Replies)
Hi,
I am using the following format command for formatting my text file in unix.
awk -F":" '{ printf "%-50s%-1s%-50s\n", $1,":", $2}' filename > targetfile
The target file is then sent as an attachment via email.
When I view the target file in notepad multiple lines get spanned as a... (2 Replies)
while read l
do
vTimeCreated=`perl -e '@d=localtime ((stat(shift))); printf "%02d-%02d-%04d %02d:% 02d:%02d\n", $d,$d+1,$d+1900,$d,$d,$d' ${l}`
echo "${l} || ${vTimeCreated}" >> ${fPrefx}_Output_Files_${vDate}.txt
done < servername.txt Using the above code to format date time for each of the... (0 Replies)
hi, please help me with the below
1)i have a file like below with data
389096
389097
389098
..and i need some thing like below
'389096','ZZ1111'
'389097','ZZ1111'
'389098','ZZ1111'
2)i have a file like below with data
8300003225
8300003223
8300006494 (7 Replies)
hi folks
am running the shell script below
#!/bin/bash
sqlplus 'scott@orcl/tiger'<<ENDSQL >> outputlogfile.csv
SET PAGES 0
SET HEAD ON
SET ECHO OFF
SET FEEDBACK OFF
SET LINESIZE 100
SET PAGESIZE 100
SET SERVEROUTPUT ON
--# Fire the query on database
select *
from employee;
... (2 Replies)
Hi Techies,
i need in n UNIX to Windows file formatting.
i have created a csv file using a script and mailed it to my email, when i open the file with Excel sheet it looks like below
Collector_no|_|Collector_Name|_|SE_Count|_|Installed_Domains|_|CPU_Sys|_|CPU_Idle|_|Memory_Util... (9 Replies)
Hi
I have a shell variable storing DATE in YYYY-MM-DD format
is there a way i extract required field say only DD
Also, would be great if there is a way which could take date format as well so that code is generic for any date format eg DDMMYYYY or DD/MM/YYYY or YYYY/MM/DD etc.
Thanks (4 Replies)
Hi All,
Here is an oracle command to list out the bug fix patches applied on Oracle Software.
(hostname)/home/oracle-> $ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed
The output of this command is as follows(Pasting only relevant section):
List of Bugs fixed by Installed Patches:
... (3 Replies)