The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sed query gopsman Shell Programming and Scripting 3 05-14-2007 05:14 AM
& in SQL query Lindarella Shell Programming and Scripting 3 10-09-2006 01:43 PM
Query In awk raguramtgr UNIX for Dummies Questions & Answers 1 08-27-2004 08:00 AM
RPM Query silvaman UNIX for Advanced & Expert Users 1 08-15-2003 04:56 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-04-2007
Registered User
 

Join Date: Dec 2007
Posts: 10
query

I have converted data written on excel sheet in unix through shell & perl prg
now the problem is I want that if starting columns of the xls sheet is Blank than when data is converted into unix then it should appear with this '|' sign. but it appearing like this:

hfgg|tytt|

but I want like this:

||hfgg|tytt|

two pipe sign for two blank columns in excel sheet.

Last edited by akash; 12-04-2007 at 04:28 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 12-04-2007
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,200
Probably when you're doing the conversion you can specify pattern to be added, logic rule like : in the beginning of every line insert " | "
Reply With Quote
  #3  
Old 12-07-2007
Registered User
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 187
an example

Quote:
Originally Posted by akash View Post
I have converted data written on excel sheet in unix through shell & perl prg
now the problem is I want that if starting columns of the xls sheet is Blank than when data is converted into unix then it should appear with this '|' sign. but it appearing like this:

hfgg|tytt|

but I want like this:

||hfgg|tytt|

two pipe sign for two blank columns in excel sheet.
hey,

Simple use awk to create excel files...as

awk '{print $1","$2","$3}' < /tmp/file.txt > /tmp/file.csv

No such delimiters would come !
Thanks !!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:18 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0