10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a text file with some thousands of rows of the following kind (this will be referred to as the inputFileWithColorsAndNumbers.txt):
Blue 6
Red 4
Blue 3
Yellow 4
Red 7
Colors in the left column and a number in the right one for each line. I want to run an awk... (5 Replies)
Discussion started by: Zooma
5 Replies
2. Shell Programming and Scripting
My original post did not show up properly. I am trying again.
I have a simple tsch script that does some basic arithmetic. The calculated value was not producing the result I was expecting. I wrote a sample script to illustrate the things that I tried.
#!/bin/tcsh
@ count = 43
@... (3 Replies)
Discussion started by: sgualandri
3 Replies
3. Shell Programming and Scripting
Hey guys, awk is putting out too many results, two of each specifically. See below.
Code:
read CPU_VENDOR_ID <<< $(cat /proc/cpuinfo | grep "vendor_id" | awk -F: '{print $2}')
echo $CPU_VENDOR_ID
echo
Output:
AuthenticAMD AuthenticAMD
I only want it to print out "AuthenticAMD" once.
... (7 Replies)
Discussion started by: 3therk1ll
7 Replies
4. IP Networking
Hi,
Can anyone explain why do I see same request twice in tcpdump package when I use "tcpdump -i any"?
So I'm tracing packets on eth1.800 interface, but using "tcpdump -i any" to capture them. What I see is that the requests/responses from my side seem to appear as duplicate in the pcap file,... (1 Reply)
Discussion started by: Juha
1 Replies
5. Shell Programming and Scripting
Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered.
The script is as follow:
#!/bin/sh
for file in file_1.txt file_2.txt file_3.txt
do
awk '{ print "0" }' $file > tmp.tmp
mv tmp.tmp $file
done
And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies
6. Shell Programming and Scripting
Hello all, I am new to this and need some help or maybe steer me to the right direction!
I wrote a script to get the highest number and prints it on the screen, the script basically asks the user to input numbers, and then prints the highest number! very simple
it works like this
$sh max.sh... (8 Replies)
Discussion started by: unknownsolo
8 Replies
7. UNIX for Dummies Questions & Answers
Hi folks,
Here i have written a shell script to calculate a maximum number from 10 numbers entered on command line.
max=0
echo Enter 10 numbers , one at a time
for i in 1 2 3 4 5 6 7 8 9 10
do
read n
max=`expr $max + $n`
if --- At this last step there is some problem, it gives error... (5 Replies)
Discussion started by: rits
5 Replies
8. AIX
I want to compress backup files to tape using compress on our AIX 4.2
- Our TAR does not have compression.
- I do not want to use local storage to compress as most of the filesystems are pretty full.
- the only compressing tool we have is 'compress'
- tapes are 5Gb 8mm
I am trying this... (10 Replies)
Discussion started by: Browser_ice
10 Replies
9. Shell Programming and Scripting
Hi all
Just wondering if someone can help me with this. I'm trying to write a script that processes the output of another file and prints only the lines I want from it.
This is only the second script I have written so please bare with me here. I have referred to the literature and some of the... (3 Replies)
Discussion started by: javathecat
3 Replies
10. Shell Programming and Scripting
Hi There,
Can you help me writing an unix script which tells me number of working days between two dates. say d1 and d2. The answer should be Integer.
is it possible in Unix.
cheers, (1 Reply)
Discussion started by: rahulkav
1 Replies