10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm on Linux version 2.6.32-696.3.1.el6.x86_64, using the Ksh shell.
I'm working with the input file:
John Daggett, 341 King Road, Plymouth MA
Alice Ford, 22 East Broadway, Richmond VA
Orville Thomas, 11345 Oak Bridge Road, Tulsa OK
Terry Kalkas, 402 Lans Road, Beaver Falls PA
Eric Adams,... (2 Replies)
Discussion started by: prooney
2 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I wish to know how to works the carriage return with cat.. As a picture often speaks better than words, my code below :
#te=`cat text.txt` (I tried this, but the same..)
te=$(cat text.txt)
echo $te
My file text.txt below:
BLABLABLABLABLALBLA
BLABLABLABLABLALBLA
... (9 Replies)
Discussion started by: Arnaudh78
9 Replies
3. 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
4. Shell Programming and Scripting
I have a CSV with carriage returns in place of newlines. I am trying to use tr to remove them, but it isn't working.
Academic year,Term,Course name,Period,Last name,Nickname
2012-2013,First Semester,English 12,4th Period,Arnold,Adam
2012-2013,First Semester,English 12,4th Period,Adams,Jim... (1 Reply)
Discussion started by: nextyoyoma
1 Replies
5. Shell Programming and Scripting
Hi all,
I'm reading a file with this layout:
First_Col Second_Col
The Second_Col has values as 1000, -1, 10, 43...
While reading the file I'm getting the second column value with awk command, but it is including the CR control char.
do
item_saved=`echo $b | awk '{print... (4 Replies)
Discussion started by: mrreds
4 Replies
6. Shell Programming and Scripting
Guys - Simple code, i am trying to get a number back from sqlplus call to a query. After that, i need to use that number in a loop.
---------------------------------
#!/bin/ksh
VALUE=`sqlplus -silent sh/password@sh <<END
set pagesize 0 feedback off verify off heading off echo off
select... (10 Replies)
Discussion started by: sunshine1974
10 Replies
7. 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
8. Shell Programming and Scripting
How do we delete all carriage returns after a particular string using sed inside a K Shell?
e.g. I have a text file named file1 below:
$ more file1
Group#=1 User=A
Role=a1
Group#=2 User=B
Role=a1
Role=b1
Group#=3 User=C
Role=b1
I want the carriage returns to be delete on the... (12 Replies)
Discussion started by: stevefox
12 Replies
9. Shell Programming and Scripting
As the title suggests, i am having some trouble figuring out how to pass spaces and carriage returns to a 'here document' ie
#!/bin/bash
/usr/local/install_script.sh <<SCRIPT
yes
no
<pass carriage retun here>
yes
no
<pass a space and then a carriage return here>
exit
SCRIPT
any... (0 Replies)
Discussion started by: hcclnoodles
0 Replies
10. UNIX for Dummies Questions & Answers
Is there a command in unix to remove a carriage return character(^M) at the end of a variable value? (5 Replies)
Discussion started by: flagship99
5 Replies