Sponsored Content
Full Discussion: Cat Help needed
Top Forums UNIX for Dummies Questions & Answers Cat Help needed Post 302563157 by vanand420 on Monday 10th of October 2011 08:10:17 AM
Old 10-10-2011
Cat Help needed

Hi,
I am unable to use a basic script in cygwin. Please help me out.

Script used :

Code:
#!/bin/bash
echo "Lucent MSC1" 
echo "===========" 
echo "Orig_MSCID Summary Top 10" 
cat k1.txt | grep -i orig_mscid | sort | uniq -c  
echo "Hourly Summary" 
cat k1.txt | grep "#" | cut -c 10-11 | uniq -c 
echo Bye

Error :

Code:
$ ./TLDN.txt
Lucent MSC1
===========
Orig_MSCID Summary Top 10
: No such file or directory
Hourly Summary
: No such file or directory
Bye

However the file exist in the folder.

Code:
$ pwd
/home/sgupt023

sgupt023@sgupt023-c420 ~
$ cd 09oct

sgupt023@sgupt023-c420 ~/09oct
$ ls
2.txt  4.txt  5.txt  6.txt  K1.txt  K2.txt  TLDN.TXT  a.txt  cgrep

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to cat file

I want to cat a file with only show the line contain '/bin/bash' but don't show the line contain 'load' (don't show if the line contain 'load' and '/bin/bash' together), how to type in the command? thk a lot! (2 Replies)
Discussion started by: zp523444
2 Replies

2. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

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

3. Shell Programming and Scripting

for i in `cat myname.txt` && for y in `cat yourname.txt`

cat myname.txt John Doe I John Doe II John Doe III ----------------------------------------------------------------------- for i in `cat myname.txt` do echo This is my name: $i >> thi.is.my.name.txt done ----------------------------------------------------------------------- cat... (1 Reply)
Discussion started by: danimad
1 Replies

4. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

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

Cat command help

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

6. UNIX for Dummies Questions & Answers

for cat help

Hi there, I have the following problem. I have a csv file which looks like 'AGI,ABJ,Y,Y,Y,None,EQUATION,ANY,ANY,None,' 'AGI,ABJ,Y,Y,Y,None,EQUATION HEAVY,ANY,ANY,None,' 'AGI,ABJ,Y,Y,Y,None,VARIATION,ANY,ANY,None,' but I do this for ab in $(cat test.csv); do echo $ab; done in the... (4 Replies)
Discussion started by: sickboy
4 Replies

7. UNIX for Dummies Questions & Answers

Question regarding Cat

Can we concatenate say, I have a few files prefixing with 2009... So now i want all the 2009 files into one single file.. Can this be achieved???? (4 Replies)
Discussion started by: saggiboy10
4 Replies

8. Shell Programming and Scripting

cat question

hello! why this works? cd /home/user cat * | ecasound -i stdin -o jack and this doesn't? cd /home/user/somedirectory cat * | ecasound -i stdin -o jack somedirectory are full with exe files which are the best source for this sort of noise thing (10 Replies)
Discussion started by: karlhungus
10 Replies

9. UNIX for Dummies Questions & Answers

Cat with << >>

Hi, When I was analyzing the code I got below line. cat - << 'EOF' >> ${FILE PATH} I surfed net to understand but I couldn't get what is about. Please help me out. (2 Replies)
Discussion started by: stew
2 Replies
bup-margin(1)						      General Commands Manual						     bup-margin(1)

NAME
bup-margin - figure out your deduplication safety margin SYNOPSIS
bup margin [options...] DESCRIPTION
bup margin iterates through all objects in your bup repository, calculating the largest number of prefix bits shared between any two entries. This number, n, identifies the longest subset of SHA-1 you could use and still encounter a collision between your object ids. For example, one system that was tested had a collection of 11 million objects (70 GB), and bup margin returned 45. That means a 46-bit hash would be sufficient to avoid all collisions among that set of objects; each object in that repository could be uniquely identified by its first 46 bits. The number of bits needed seems to increase by about 1 or 2 for every doubling of the number of objects. Since SHA-1 hashes have 160 bits, that leaves 115 bits of margin. Of course, because SHA-1 hashes are essentially random, it's theoretically possible to use many more bits with far fewer objects. If you're paranoid about the possibility of SHA-1 collisions, you can monitor your repository by running bup margin occasionally to see if you're getting dangerously close to 160 bits. OPTIONS
--predict Guess the offset into each index file where a particular object will appear, and report the maximum deviation of the correct answer from the guess. This is potentially useful for tuning an interpolation search algorithm. --ignore-midx don't use .midx files, use only .idx files. This is only really useful when used with --predict. EXAMPLE
$ bup margin Reading indexes: 100.00% (1612581/1612581), done. 40 40 matching prefix bits 1.94 bits per doubling 120 bits (61.86 doublings) remaining 4.19338e+18 times larger is possible Everyone on earth could have 625878182 data sets like yours, all in one repository, and we would expect 1 object collision. $ bup margin --predict PackIdxList: using 1 index. Reading indexes: 100.00% (1612581/1612581), done. 915 of 1612581 (0.057%) SEE ALSO
bup-midx(1), bup-save(1) BUP
Part of the bup(1) suite. AUTHORS
Avery Pennarun <apenwarr@gmail.com>. Bup unknown- bup-margin(1)
All times are GMT -4. The time now is 11:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy