11-17-2004
^M must not be carriage return
Before and after I tried to remove the ^M with the echo command, (per your instructions) it did not put an extra line between the output of these commands:
echo $variable
echo $variable
echo $variable
or
echo $bar
echo $bar
echo $bar
Sorry, I must have wrong, ^M must not be a carriage return, at least not to the echo command. After doing the
bar=`echo $variable`, the ^M is still there at the end of the variable bar.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
has anyone got any suggestions how i would pick up the string as part of a substitution inclusive of the carriage return.
ie
i want to pick up <<NAME>> from the PS output but the <<; seems to be on the line before the NAME.
Any ideas are appreciated!
... (3 Replies)
Discussion started by: Shakey21
3 Replies
2. Shell Programming and Scripting
Hi, I have a script that outputs a file that contains the dates from the previous month, which is then used by our application to run processes on each date contained in the file. My problem is is that my script created a blank line at the bottom of the file which causes issues for our... (14 Replies)
Discussion started by: bd_joy
14 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a situation where I need to remove the carriage return between the lines.
For.eg.
The input file:
1,ad,"adc
sdfd",edf
2,asd,"def
fde",asd
The output file should be
1,ad,adc sdfd,edf
2,asd,def fde,asd
Thanks
Shash (5 Replies)
Discussion started by: shash
5 Replies
4. Shell Programming and Scripting
Hi I would like to add carriage return at end of file,
because we need to mask the customer names for detailed records.
Some what the file doesnot have carriage at end of line of last record.So that i 'll get 2 records when use
---aa.txt-----
1|aaa|bbb|ccc
2|bbbb|hghgh|ggg
000002
tail... (2 Replies)
Discussion started by: HAA
2 Replies
5. UNIX for Advanced & Expert Users
Hi All,
I am getting a xml file where the first field contains a carriage return and the all other fields doesnot contains any carriage return. So all the other records comes in the second line.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:iSeriesCspIntegration... (3 Replies)
Discussion started by: dasj22
3 Replies
6. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
7. Shell Programming and Scripting
Hi All,
I am reading two files and writing out the file name and count of lines in each file to an output file.
My script looks like this:
echo "input_file1.out;`wc -l < input_file1.out | sed 's/^]*\(.*\)]*$/\1/'` " > comp_file1.out
echo "input_file2.out;`wc -l < input_file2.out | sed... (2 Replies)
Discussion started by: Hangman2
2 Replies
8. Shell Programming and Scripting
Hi all gurus,
I need help in removing carriage return existed within a record delimited by pipe <|>.
Sample:
A_01|Test1|Testing1|Remarks1
A_02|Test2|Test
ing2|Remarks2
A_03|Test3|Testing3|
Remarks3
Desire output:
A_01|Test1|Testing1|Remarks1
A_02|Test2|Testing2|Remarks2... (10 Replies)
Discussion started by: agathaeleanor
10 Replies
9. Shell Programming and Scripting
Hi,
I try to handle very large numbers with a bash script. I run ssh command in a remote server and store the output in a local variable. But this output contains a return carriage at the end. So I try to remove it by tr But I can't figure out the right notation with printf. So my problem... (6 Replies)
Discussion started by: Meacham12
6 Replies
10. UNIX for Dummies Questions & Answers
I need to remove the carriage return comes inbetween the record.
Need to have CR only at the end.
I used the below command.
tr -d '\n' < filewithcarriagereturns > filewithoutcarriagereturns
But its removing all the CR and giving one line output.
Input File:
12345
abcdegh... (11 Replies)
Discussion started by: srvn_saru
11 Replies
uugetty(1M) uugetty(1M)
NAME
uugetty - set terminal type, modes, speed and line discipline
SYNOPSIS
timeout] line [speed [type [linedisc]]]
file
DESCRIPTION
The commands, including are targeted for removal from HP-UX; see the below.
sets terminal type, modes, speed and line discipline. It is similar to except that supports using the line in both directions (see
getty(1M)). This allows users to log in, but, if the line is free, and can dial out (see uucico(1), cu(1), and ct(1)). When devices are
used with and lock files are created. Therefore, when the call to returns (see open(2)) (or the first character is read when the option is
used), the status of the lock files indicates whether the line is used by or someone trying to log in. See getty(1M) for more information.
Note that with the option, several carriage-return characters might be required before the login message is output. When is trying to log
in, it can be instructed to enter numerous carriage-return characters with the following login script:
where ... represents whatever would normally be used for the login sequence.
An entry for an intelligent modem or direct line that has a on each end must use the option (this causes uugetty to wait to read a charac-
ter before it enters the login message, thus preventing two instances of from looping). If there is a on one end of a direct line, there
must be a on the other end as well.
EXAMPLES
The following line is an entry using on an intelligent modem or direct line:
WARNINGS
Use of commands, including is discouraged because they are targeted for removal from HP-UX. Use ftp(1) or rcp(1) instead.
does not work when is used with an intelligent modem such as a Penril or a Ventel.
FILES
SEE ALSO
ct(1), cu(1), login(1), uucico(1M), getty(1M), init(1M), ioctl(2), gettydefs(4), inittab(4), tty(7).
Tim O'Reilly and Grace Todino,
O'Reilly & Associates, Inc. USA.
Grace Todino and Dale Dougherty,
O'Reilly & Associates, Inc. USA.
TO BE OBSOLETED uugetty(1M)