10 More Discussions You Might Find Interesting
1. Solaris
I am trying to read some data form .key file with cat command..but its not displaying data correctly..tried with other commands also still no use.i tried with CAT with SED combination but no use..
Please help me with the command or script. (10 Replies)
Discussion started by: kish_rock
10 Replies
2. Shell Programming and Scripting
I have two files as below
1.txt
AA 123
CC 145
DD 567
2.txt
AA 111
YY 128
CC 144
FF 222
DD 777
ZZ 875
basically 1.txt is updated file, if i do cat 1.txt 2.txt output should be as below
o/p (2 Replies)
Discussion started by: Tecnical_help12
2 Replies
3. Shell Programming and Scripting
Hi.
I'm just wondering how can I read variable text files through cat command.
I made a shell script to count frequency of words and array them with variable conditions. It's only working for one file that I wrote in script now. But I want to make it working for every text file when I execute... (2 Replies)
Discussion started by: rlaxodus
2 Replies
4. Shell Programming and Scripting
Hi Everyone,
I have a file: a.txt
a,b,c,d,6,6,6
1,2,3,d,6,6,6
4,5,6,6,6,6,6
#!/usr/bin/perl
use warnings;
use strict;
my @array = ();
### Load file into array
for my $i (split '\n', `cat /tmp/a.txt`) {
push @array, ;
}
It works. But my a.txt have 1million lines, and... (2 Replies)
Discussion started by: jimmy_y
2 Replies
5. Shell Programming and Scripting
What is wrong with my menu script? Do I need to continue with the read statements? All I want to do with option 4 is to cat some /var/log/files and awk out a few lines? How do I do that please?
$ cat menu.sh ... (11 Replies)
Discussion started by: taekwondo
11 Replies
6. Shell Programming and Scripting
I want to concatenate 100 files to one file and append file name in each record to find out which file it came from
for a in $(<shal_group)
do
cat $a >> bigoutput.group
The above code put all files in one file but i want file name appended to each file
Record should be like this... (3 Replies)
Discussion started by: pinnacle
3 Replies
7. 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
8. UNIX for Dummies Questions & Answers
Hi
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies
9. AIX
I would like to append some statement into 1 single file so that it can be concatenate together in 1 word. I have tried >> but it will seperate my 2 statement into 2 rows.
# cat abc.txt cde.txt > result.txt
where abc.txt is "abcde" and cde.txt is "12345"
the result should come out as... (3 Replies)
Discussion started by: kwliew999
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm having some trouble reading a file that was 'cat' through a while loop. Can anyone suggest alternatives? what i do is
cat filename|grep *.stuff
while read line
do
echo $line
... and other commands
done
The cat,grep line seems to work correctly, but the script hangs when i add in... (3 Replies)
Discussion started by: chugger06
3 Replies