9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Team,
we use below command to store the contents in a logfile.
cat a.txt > a.log
a.txt content is
123
345
Is there any options available to store the command used also?
for eg a.log may show as
cat a.txt
123
345 (5 Replies)
Discussion started by: sid2013
5 Replies
2. Shell Programming and Scripting
Hi Guru's.
I am trying to use to check if $5 is greater than 80 & if not 100, then to print $0 :
awk '{ if ($5>80) && if ($5 != 100) print $0}
But getting error:
>bdf1|sed 's/%//g'|awk '{ if ($5>80) && if ($5 != 100) print $0}'
syntax error The source line is 1.
The error... (6 Replies)
Discussion started by: rveri
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am doing this:
ll -tr | awk '{print $6, $7, $8, $9}'
the result is:
Dec 30 2008 text1.txt
Mar 4 2009 text2.txt
Apr 10 2009 text3.txt
and now I want to show the content of $9 using below:
ll -tr | awk '{print $6, $7, $8, $9}' ; '{cat $9}' (25 Replies)
Discussion started by: messi777
25 Replies
4. Shell Programming and Scripting
cat & telnet
hello,
I need some help on using a file with the cat command. I want to set up a telnet connection with a network device with the ip-adress 10.3.0.1. Just executing the command 'telnet 10.3.0.1' gives a menu. For example, to show the help of the menu, you... (2 Replies)
Discussion started by: michealvh
2 Replies
5. Shell Programming and Scripting
Im trying to use cat and awk to calculate the total space, then display it using the print command. But something in my script is not correct?
cat | awk '{print$1}' | sort -n | grep -v used | awk '{sum += $1} END { p
rint sum;}'
??? Any help would be greatly appreciated!! (10 Replies)
Discussion started by: bigben1220
10 Replies
6. Shell Programming and Scripting
Hi Guys,
I was recently come across some code to hopefully learn a little bit about putting Shell commands into PHP application to run on a Linux server. However, I don't understand the command AT ALL... and was wondering if anyone can interpret it:
cat userIDs.dat | awk '{s=s+1; if... (1 Reply)
Discussion started by: jordRiot
1 Replies
7. UNIX for Dummies Questions & Answers
I need to change all Newline caracters (\12) to Fieldseparator(\34).
tr -A '\12' '\34' <file1> file2
Replace all delete (\177) with Newline (\12)
tr -A '\177' '\12' <file2> file3
Put the name of the file first in all rows.
awk '{printf "%s\34%s\n", FILENAME,$0} file3 > file4
So far no... (6 Replies)
Discussion started by: MrKlint
6 Replies
8. Shell Programming and Scripting
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
9. 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