Sponsored Content
Top Forums Shell Programming and Scripting Display and write in file in one echo command Post 302531233 by vivek1489 on Thursday 16th of June 2011 06:50:44 AM
Old 06-16-2011
Display and write in file in one echo command

Hi All,
I want to display content on command promt and also write in file.
For that iI ahve to write two sentence
echo "XXXXXXX"
echo "XXXXXXXX" >> 1.txt

Is there any way to write in one echo statement
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display from a variable using echo.

I have a variable that is outputting a lot of space. here has been 45 lines returned ... how can I remove the spaces between the "been and the 45" CODE: fil_len=`wc -l < coshb.txt` if ; then cat coshb.txt | more echo " " echo "There has been ${fil_len} lines... (4 Replies)
Discussion started by: jagannatha
4 Replies

2. Shell Programming and Scripting

what does echo $$ command display

whats the value stored in $$ (2 Replies)
Discussion started by: suri
2 Replies

3. Shell Programming and Scripting

echo command and file I/O Redirection

I have a colon-delimited text file of names, addresses and phone numbers. I am trying to write a script that can add additional entries and then sort it alphabetical by last name and resave it to the original file. I am using C shell to script. This is the section of my script that I wish to... (8 Replies)
Discussion started by: userix
8 Replies

4. Shell Programming and Scripting

Need a Command To display "echo command value in loop" in single line.

Hi I want to display "echo command value in loop" in single line. My requirement is to show the input file (test_1.txt) like the output file (test_2.txt) given below. Input file :test_1.txt a1|b1|4|5 a1|b1|42|9 a2|b2|32|25 a1|b1|2|5 a3|b3|4|8 a2|b2|14|6 Output file:test_2.txt... (2 Replies)
Discussion started by: sakthifire
2 Replies

5. Shell Programming and Scripting

Display echo results in three column

Dear Friends, I have my command output which displays on one row and values are now scrollable (vertical) 3 pages. How do i display those output in three column so that i no need to scroll? Example: dcadd$cat components 1.Caluculator 2.Diary ... ... 50.Mobile 51.Battery .. ...... (12 Replies)
Discussion started by: baluchen
12 Replies

6. UNIX for Dummies Questions & Answers

echo: write error: Broken pipe ??

I want to try the unix pipe, the command is like this: echo new | find . the standard output of the echo should be "new", then I guess find command will use this output as input to find the file named "new". But the output is all the file names in my current dir, the last line is "echo: write... (5 Replies)
Discussion started by: andrewust
5 Replies

7. Shell Programming and Scripting

echo display problem

Hi I am facing a strange problem a=03 echo ${a} the output is 3 But i want to display it is 03 Can you people help me how to display it like 03. Thanks (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

8. Homework & Coursework Questions

Using ls or echo to display a specific output

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: What single command line would you enter to get the following output? 8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Discussion started by: dasboot
6 Replies

9. Shell Programming and Scripting

display echo only once

lets say I am printing something out echo "Please enter a valid username" and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but that just makes everything fit on one line. Right now it keeps saying Please enter a valid... (5 Replies)
Discussion started by: subway69
5 Replies

10. Shell Programming and Scripting

Display match or no match and write a text file to a directory

The below bash connects to a site, downloads a file, searches that file based of user input - could be multiple (all that seems to work). What I am not able to figure out is how to display on the screen match found or no match found" and write a file to a directory (C:\Users\cmccabe\Desktop\wget)... (4 Replies)
Discussion started by: cmccabe
4 Replies
LOCALE_GET_DISPLAY_LANGUAGE(3)						 1					    LOCALE_GET_DISPLAY_LANGUAGE(3)

Locale::getDisplayLanguage - Returns an appropriately localized display name for language of the inputlocale

	Object oriented style

SYNOPSIS
publicstatic string Locale::getDisplayLanguage (string $locale, [string $in_locale]) DESCRIPTION
Procedural style string locale_get_display_language (string $locale, [string $in_locale]) Returns an appropriately localized display name for language of the input locale. If is NULL then the default locale is used. PARAMETERS
o $locale - The locale to return a display language for o $in_locale - Optional format locale to use to display the language name RETURN VALUES
display name of the language for the $locale in the format appropriate for $in_locale. EXAMPLES
Example #1 locale_get_display_language(3) example <?php echo locale_get_display_language('sl-Latn-IT-nedis', 'en'); echo "; "; echo locale_get_display_language('sl-Latn-IT-nedis', 'fr'); echo "; "; echo locale_get_display_language('sl-Latn-IT-nedis', 'de'); ?> Example #2 OO example <?php echo Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'en'); echo "; "; echo Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'fr'); echo "; "; echo Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'de'); ?> The above example will output: Slovenian; slovxc3xa8ne; Slowenisch SEE ALSO
locale_get_display_name(3), locale_get_display_script(3), locale_get_display_region(3), locale_get_display_variant(3). PHP Documentation Group LOCALE_GET_DISPLAY_LANGUAGE(3)
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy