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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Redirect output mpang_ Shell Programming and Scripting 1 08-15-2007 09:57 AM
how to redirect my output in a new terminal Sayantan SUN Solaris 0 06-29-2007 07:01 AM
redirect output of FTP kcaluwae Shell Programming and Scripting 4 06-23-2005 09:45 AM
redirect command output to variable hugow UNIX for Dummies Questions & Answers 1 06-22-2005 07:43 AM
Is there a linux version of dos2unix command? kymberm UNIX for Dummies Questions & Answers 4 05-29-2003 01:33 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-25-2008
nrbhole nrbhole is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 18
redirect output of dos2unix command

hi

I want to suppress the output of dos2unix command in my shell script. I'm using follwing command in my script

dos2unix somefile >/dev/null

But it's still showing output while executing the script.Please help me to sort this out

Thanks
  #2 (permalink)  
Old 01-25-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
I can't reproduce this...
Code:
$ dos2unix data
ISD=977155185403901+DIE CAST+DIE CAST 055555+01087+001008+SPR 08+08+004+Y'
ISD=977155185403901+DIE CAST+DIE CAST?+55555+01087+001008+SPR 08+08+004+Y'
$ dos2unix data > /dev/null
$

Maybe something else is causing the output, not dos2unix. But if you discard the output from dos2unix, why run it at all? It will have no effect except to waste time.
  #3 (permalink)  
Old 01-25-2008
uvrakesh uvrakesh is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 78
id it is an error then
use
2>/dev/null
  #4 (permalink)  
Old 01-25-2008
ashokmeti ashokmeti is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalooru
Posts: 15
hi

Quote:
Originally Posted by nrbhole View Post
hi

I want to suppress the output of dos2unix command in my shell script. I'm using follwing command in my script

dos2unix somefile >/dev/null

But it's still showing output while executing the script.Please help me to sort this out

Thanks

hope u want to see only errors not exectued onces right???
try this
dos2uix folder/*.* > text

folder which contains files need for conversion.
this should work.
  #5 (permalink)  
Old 01-25-2008
nrbhole nrbhole is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 18
Hello friends,

Thanks for your reply.
I tried for dos2uix folder/*.* > text, 2>/dev/null, but none of them worked

Actually it's not error. I need to avoid output like.
dos2unix: converting file hosting-network-and-datacenter.html to UNIX format ...
My code is given below
Quote:
function file_mod()
{
echo "Removing Blank Spaces.."
dos2unix $1>/dev/null
sed -i '/^$/d' $1
}
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0