The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
How to set echo on siegfried Shell Programming and Scripting 1 11-18-2005 01:56 AM
What does echo ^[[r do? hamsasal UNIX for Advanced & Expert Users 1 07-24-2005 02:14 PM
echo with \n whatisthis UNIX for Dummies Questions & Answers 3 05-18-2005 11:59 AM
echo ????? nguda UNIX for Dummies Questions & Answers 1 06-30-2003 05:02 PM
echo help bb00y High Level Programming 5 10-02-2002 09:53 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 04-11-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
Arrow awk to echo ???

Hi All,
I have the below command.
Code:
awk 'BEGIN {printf("%1s","cat")}' > temp.txt
can i do the same using echo ?If So, how?

Thanks
JS

Last edited by Yogesh Sawant; 04-11-2008 at 01:51 AM.. Reason: added code tags
  #2 (permalink)  
Old 04-11-2008
krishmaths krishmaths is offline
Registered User
  
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 191
Quite close

May not be what you are looking for... but may be a lead..

Code:
echo "cat" | tr "\n" " " > temp.txt
  #3 (permalink)  
Old 04-11-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
See if you have printf(1) available directly as a shell command.

Code:
vnix$ printf %1s cat
catvnix$
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 04:02 AM.


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