10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
Hope you are all doing fine.
The problem today i faced during my coding was i wanted to add a space equals to a tab character in front of all the lines which i am cat using tee command.
Main file contents
mainfile
... (4 Replies)
Discussion started by: mad man
4 Replies
2. Shell Programming and Scripting
Thank you in advance for looking at this, I've scoured the internet and can't find the answer I'm looking for!! - I am new at bash script so please bare with me!!
I have a script where I've identified individual files within a folder, the filename is then stored as a variable ($filename):... (3 Replies)
Discussion started by: paperbackwriter
3 Replies
3. 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
4. Shell Programming and Scripting
MyFile contains:
ALTER TABLE $DBN.$TBN
ADD $COL $TYP COMPRESS ($VAL);
I need to cat the file and have it substitute all of the variables with their contents. cat MyFile does not work. The following works for the first line, but errors on the second line because of the paren:
$ while read... (2 Replies)
Discussion started by: Phil27577
2 Replies
5. Shell Programming and Scripting
I have results from some statistical analyses.
The format of the results are as given below:
I want to select lines that have a p-value (last column) less than 0.05 from all the results files (*.results) and cat to a new results file.
It would be very nice if a new column is added that tells... (2 Replies)
Discussion started by: genehunter
2 Replies
6. UNIX for Dummies Questions & Answers
Hello...
Is it possible that we can change the format of the values we entered in a text file using cat?
Like for example, I will create a text file names.txt using cat and as I save the names and view the text file... the format will be like this
... (5 Replies)
Discussion started by: kpopfreakghecky
5 Replies
7. Shell Programming and Scripting
I wanted to store a value read from a file in a variable with a given format. I was doing the first step as follows :
it0="$(cat ./myfile)"
I thought the second step would work as: it0= ` printf "%6.3f\n" $it0 `
but it says "./curplot.sh: line 33: 0.035: command not found", although it... (2 Replies)
Discussion started by: josegr
2 Replies
8. Shell Programming and Scripting
hello
just i saw a really strange for cat
i have file (file1) contains line /home/rajiv/proj1/*.txt
now applied a commonds
DDPATH="$(cat file1)"
echo $DDPATH
it shows all the txt files in that folder like /home/rajiv/proj1/read1.txt /home/rajiv/proj1/read2.txt... (7 Replies)
Discussion started by: shailesh_arya
7 Replies
9. UNIX for Dummies Questions & Answers
I have a question to do and it's somewhat confusing. It says, and I quote
"Create a file called file_1 with three lines of text in it. Create a shell variable called "f_name", assign it the string "file_1". Use the cat command and the variable "f_name" to display the contents of the file... (3 Replies)
Discussion started by: MaestroRage
3 Replies
10. UNIX for Dummies Questions & Answers
When I use this command I get an output of some numbers
cat ac.20070511 | cut -d" " -f19
Is there any way for me to display only the numbers that are greater than 1000 but not all the numbers in the ouput.
Can any one help me with this. :) (8 Replies)
Discussion started by: venu_nbk
8 Replies