02-14-2009
I was hoping you wouldn't say that
See, I figured there must be some trick or something, because when I simply add a new line like that (by opening in TextWrangler and hitting Enter at the end of the line), my output gets... weird.
This is a short example of what it was doing when I first posted.
FirstLine.txt:
Quote:
ProductID|Name|Price|Color
kids.txt:
Quote:
24234232|Thing|2.50|Red
24324242|Item|3.50|Blue
23423422|This|4.50|Black
cat FirstLine.txt kids.txt > readyToProcess.txt
Quote:
ProductID|Name|Price|Color24234232|Thing|2.50|Red
24324242|Item|3.50|Blue
23423422|This|4.50|Black
After adding the new line to FirstLine.txt, I try cat'ing again, but this time, the resulting readyToProcess.txt file looks like this:
Quote:
ProductID|Name|Price|Color
24234232|Thing|2.50|Red
24324242|Item|3.50|Blue
23423422|This|4.50|Black
So, it added the first line great - but why on earth would it throw an extra line break between all the rest of the lines in the file?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
Consider the following magic words:
# ls `which adduser`
ls: /usr/sbin/adduser: No such file or directory
#
Hmmm...
Then:
# ls /usr/sbin/adduser
/usr/sbin/adduser
#
Now what?
Unforunately this little sniippet is used in my debian woody server's mysql pre install script.... (2 Replies)
Discussion started by: osee
2 Replies
2. Shell Programming and Scripting
Hi,
I use the command
ls a\b\c\*.txt
from the command line on HP UNIX and it works fine - It lists all files matching *.txt in the a\b\c directory
When embeded in a ksh script
`ls a\b\c\*.txt`
it does not work - I get *.txt not found (even though there are files)
I tried... (10 Replies)
Discussion started by: GNMIKE
10 Replies
3. UNIX for Dummies Questions & Answers
I have a script with a find command using xargs to copy the files found to another directory. The find command is finding the appropriate file, but it's not copying. I've checked permissions, and those are all O.K., so I'm not sure what I'm missing. Any help is greatly appreciated.
This is... (2 Replies)
Discussion started by: mpflug
2 Replies
4. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
5. Shell Programming and Scripting
total=0
seq 1 5 | while read i ; do
total=$(($total+$i))
echo $total
done
echo $totalThis outputs:
1
3
6
10
15
0whereas I am expecting:
1
3
6
10
15
15My bash version: (4 Replies)
Discussion started by: meharo
4 Replies
6. Shell Programming and Scripting
I was trying to write a simple script which will read a text file and count the number of vowels in the file. My code is given below -
#!/bin/bash
file=$1
v=0
if
then
echo "$0 filename"
exit 1
fi
if
then
echo "$file not a file"
exit 2
fi
while read -n... (14 Replies)
Discussion started by: linux_learner
14 Replies
7. UNIX for Dummies Questions & Answers
Hi. I am trying to start a script on my router that will execute even if i log off. To execute the script I write:
nohup ./dslconnection > dslstat.out 2>&1 &
It starts the job:
21968 admin 1604 S /bin/ash ./dslconnection
The problem is that when I log back in the job has been... (6 Replies)
Discussion started by: sebcou
6 Replies
8. Shell Programming and Scripting
Hi,
Recently I got a .txt file from Mac user. when I try to open it in my Ubuntu machine using cat command it is not displaying any content of file however I can see the content using vi.
Anyone know How to see its content using cat as I have to process it in my shell script.
Thanks in... (4 Replies)
Discussion started by: diehard
4 Replies
9. Shell Programming and Scripting
Hi, I'm having trouble with a simple copy command in a script on HPUX.
I am trying to copy a file and append date & time.
The echo command prints out what I am expecting..
echo "Backing up $file to $file.$DATE.$FIXNUM" | tee -a $LOGFILE
+ echo 'Backing up... (4 Replies)
Discussion started by: Glennyp
4 Replies
10. Shell Programming and Scripting
Following one line of awk code removes first 3 characters from each line but when I run the same code on another linux platform it doesn't work and only prints blank lines for each record. Can anyone please explain why this doesn't work? (31 Replies)
Discussion started by: later_troy
31 Replies
LEARN ABOUT DEBIAN
color::library::dictionary::tango
Color::Library::Dictionary::Tango(3pm) User Contributed Perl Documentation Color::Library::Dictionary::Tango(3pm)
NAME
Color::Library::Dictionary::Tango - (Tango) The Tango color palette
DESCRIPTION
The Tango icon theme's goal is to make applications not seem alien on any desktop. A user running a multiplatform application should not
have the impression that the look is unpolished and inconsistent with what he or she is used to. While this isn't about merging styles of
all desktop systems, we do aim to not be drastically different on each platform.
The Tango color palette consists of 27 RGB colors.
<http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines>
COLORS
Aluminium 1 aluminium1 #eeeeec
Aluminium 2 aluminium2 #d3d7cf
Aluminium 3 aluminium3 #babdb6
Aluminium 4 aluminium4 #888a85
Aluminium 5 aluminium5 #555753
Aluminium 6 aluminium6 #2e3436
Butter 1 butter1 #fce94f
Butter 2 butter2 #edd400
Butter 3 butter3 #c4a000
Chameleon 1 chameleon1 #8ae234
Chameleon 2 chameleon2 #73d216
Chameleon 3 chameleon3 #4e9a06
Chocolate 1 chocolate1 #e9b96e
Chocolate 2 chocolate2 #c17d11
Chocolate 3 chocolate3 #8f5902
Orange 1 orange1 #fcaf3e
Orange 2 orange2 #f57900
Orange 3 orange3 #ce5c00
Plum 1 plum1 #ad7fa8
Plum 2 plum2 #75507b
Plum 3 plum3 #5c3566
Scarlet Red 1 scarletred1 #ef2929
Scarlet Red 2 scarletred2 #cc0000
Scarlet Red 3 scarletred3 #a40000
Sky Blue 1 skyblue1 #729fcf
Sky Blue 2 skyblue2 #3465a4
Sky Blue 3 skyblue3 #204a87
perl v5.14.2 2011-12-07 Color::Library::Dictionary::Tango(3pm)