LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-21-2011, 03:16 AM   #1
infosrig
LQ Newbie
 
Registered: Feb 2010
Location: Tamil Nadu, India
Distribution: CentOs 5.5
Posts: 28

Rep: Reputation: 0
Question How to retain Multiple spaces and tabs in a file by c-sh file operation


Iam reading a file using C-sh script after manipulating the variables I need to dump into a new file. This in working fine but I couldn't retain the multiple spaces and tabs in a same line.
For readability I want to print it back as I read.

Now script treating multiple tabs as onl tab or space.

Please help in this regard
 
Old 02-21-2011, 03:21 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Please, can you show the relevant lines of the code? It's hard to guess a solution without knowing which commands you use to read/manipulate the original data and print out the copy!
 
Old 02-21-2011, 11:07 PM   #3
infosrig
LQ Newbie
 
Registered: Feb 2010
Location: Tamil Nadu, India
Distribution: CentOs 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
Please, can you show the relevant lines of the code? It's hard to guess a solution without knowing which commands you use to read/manipulate the original data and print out the copy!

Thnx for the rply, I did using "IFS" command!!!
 
Old 02-22-2011, 03:08 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Glad to see it's solved. It would be nice if you could share your newly acquired knowledge (along with a more detailed description of the problem) for future reference to other C-shell users. Thx.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make arithmetic operation of data file with script file? mauludi Linux - Newbie 5 09-01-2010 05:26 AM
How to retain .bashrc file? tulsi Linux - Newbie 3 09-08-2009 05:31 PM
want a file browser with multiple tabs sumeet inani Linux - Newbie 4 03-08-2009 11:38 PM
retain file permission lightpace Linux - Newbie 1 12-06-2007 12:47 AM
Vi - retain position in file between invokations of vi Xanadu Linux - Software 1 12-23-2004 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration