Sponsored Content
Full Discussion: Removed ^M from Libraries
Top Forums UNIX for Advanced & Expert Users Removed ^M from Libraries Post 302231268 by buffoonix on Tuesday 2nd of September 2008 03:01:12 AM
Old 09-02-2008
Hm, I would think it depends on what the poster has really typed when he entered the perl statement's substitution.
If he pressed ^V and then hit Enter then ^M should represent \015.
But if he actually only typed a caret (or circumflex) followed by upper case M,
yes than it just represents those Ms.
Maybe he should pipe his statement from the history into an octal dump to make sure?
Code:
$ echo ^M|od -t a
0000000  cr  nl
0000002

$ echo ^M|od -t a
0000000   ^   M  nl
0000003

 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Will Old Files Be Removed

I have windows Xp installed, and decided to install Solaris Sun Unix 10. The hard disk was previousely partitioned into 5 partition. C: = Win98 D = WinXP and e,f,g,h are applications and so on. When istalling Sun Unix, will all the drives be removed, or I will specify where to install it. Thanks... (5 Replies)
Discussion started by: sunsation
5 Replies

2. Shell Programming and Scripting

directories are not getting removed

hello Everyone. I'm having the following problem: I have number of installation in the directory. each installation consists of executable file and directory. when I do the new installation I move old one to File_name-Time_stamp. this is done for executable and for directory. Everything is done... (6 Replies)
Discussion started by: slavam
6 Replies

3. UNIX for Dummies Questions & Answers

recovering files removed with rm

Hello, I was reading the manual on rm and it states that when you use 'rm' the files are usual recoverable, how is this done? Does it assume that a backup system is in place? Cheers Jack (4 Replies)
Discussion started by: jack1981
4 Replies

4. UNIX for Dummies Questions & Answers

a way to tell what was removed after rm -rf ?

Hello all! I ran rm -rf on a wrong directory, noticed it and hit ctrl-c. Is there any way on a debian machine to tell what actually got deleted? As there were many dirs and files in this directory that I don't care for, I'd like to see if anything important was removed. Or do you know in... (4 Replies)
Discussion started by: thosch
4 Replies

5. Shell Programming and Scripting

Duplicates to be removed

Hi, I have a text file with 2000 rows and 2000 columns (number of columns might vary from row to row) and "comma" is the delimiter. In every row, there maybe few duplicates and we need to remove those duplicates and "shift left" the consequent values. ex: 111 222 111 555 444 999 666... (6 Replies)
Discussion started by: prvnrk
6 Replies

6. Shell Programming and Scripting

Removed Lines

Hi Guys, I am using SunOS 5.9 running Oracle Databases on it... I have log files that I suspect that some lines within the logs where removed. How do I tell if indeed some lines within a particular file where removed and by whom? Thanks in advance (2 Replies)
Discussion started by: Phuti
2 Replies

7. Linux

file removed

Hi Team, I have deleted a file accidentally by using rm command. I am not the root(admin) user. Can you please let me know how to get that .tex file? (2 Replies)
Discussion started by: darling
2 Replies
ECHO(3) 								 1								   ECHO(3)

echo - Output one or more strings

SYNOPSIS
void echo (string $arg1, [string $...]) DESCRIPTION
Outputs all parameters. echo is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo (unlike some other language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want to pass more than one parameter to echo, the parameters must not be enclosed within parentheses. echo also has a shortcut syntax, where you can immediately follow the opening tag with an equals sign. Prior to PHP 5.4.0, this short syn- tax only works with the short_open_tag configuration setting enabled. I have <?=$foo?> foo. PARAMETERS
o $arg1 - The parameter to output. o $... - RETURN VALUES
No value is returned. EXAMPLES
Example #1 echo examples <?php echo "Hello World"; echo "This spans multiple lines. The newlines will be output as well"; echo "This spans multiple lines. The newlines will be output as well."; echo "Escaping characters is done "Like this"."; // You can use variables inside of an echo statement $foo = "foobar"; $bar = "barbaz"; echo "foo is $foo"; // foo is foobar // You can also use arrays $baz = array("value" => "foo"); echo "this is {$baz['value']} !"; // this is foo ! // Using single quotes will print the variable name, not the value echo 'foo is $foo'; // foo is $foo // If you are not using any other characters, you can just echo variables echo $foo; // foobar echo $foo,$bar; // foobarbarbaz // Some people prefer passing multiple parameters to echo over concatenation. echo 'This ', 'string ', 'was ', 'made ', 'with multiple parameters.', chr(10); echo 'This ' . 'string ' . 'was ' . 'made ' . 'with concatenation.' . " "; echo <<<END This uses the "here document" syntax to output multiple lines with $variable interpolation. Note that the here document terminator must appear on a line with just a semicolon. no extra whitespace! END; // Because echo does not behave like a function, the following code is invalid. ($some_var) ? echo 'true' : echo 'false'; // However, the following examples will work: ($some_var) ? print 'true' : print 'false'; // print is also a construct, but // it behaves like a function, so // it may be used in this context. echo $some_var ? 'true': 'false'; // changing the statement around ?> NOTES
Note Because this is a language construct and not a function, it cannot be called using variable functions. SEE ALSO
print(3), printf(3), flush(3), Heredoc syntax. PHP Documentation Group ECHO(3)
All times are GMT -4. The time now is 07:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy