10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
So awk is driving me crazy on this one. I have searched everywhere and read man, docs and every related post Google can find and still no luck. The actual files I need to run this on are sensitive in nature, but it is the same thing as if I needed to calculate weighted grades for multiple... (15 Replies)
Discussion started by: cotilloe
15 Replies
2. Shell Programming and Scripting
Hi All,
Seeking for your assistance on how to condition it correctly.
cat file1.txt
290,1663,43,888,0,0.00,86.91,0.00,26.98,0.00
290,1663,52,0,0,0.00,0.00,0.00,0.00,0.00
290,1663,52,888,0,0.00,34.60,0.00,9.00,0.00
1st scenario:
if the fourth column contains 888s and 0s it is by... (16 Replies)
Discussion started by: znesotomayor
16 Replies
3. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
4. Shell Programming and Scripting
Hi friends,
I'm having a bit of a problem using shell variable in an awk if statement.
Please note that i'm using -v option as listed in many forums but I still don't get it working. Here's my code. Kindly help as I've gone crazy trying to work this out :wall:
#!/bin/bash -xv
... (4 Replies)
Discussion started by: vishwas.s
4 Replies
5. Shell Programming and Scripting
Hi, below is the script in ksh and i am having issues with if condition.
It takes in one argument as input and executes the shell script.
The problem is in if condition in shell script. If input is given as 1 it works out well. But if input is given as 2 or something else the script is failing to... (1 Reply)
Discussion started by: abhi_123
1 Replies
6. Shell Programming and Scripting
Hi, I'm writing a bash script and i have a condition that goes
if
then
break
fi
but, when i go to run it, i come across this
line 10: '
where line 10 is the if
I don't know what's going on :( (2 Replies)
Discussion started by: channyboy
2 Replies
7. Shell Programming and Scripting
Hi all,
I have task to delete two different files from all file system. one is core file & other is old file.
i can delete core file but for old file i have to mv in different location.
i wrote a script but it is not working.
i have a two variables in this script first one is delcnt &... (6 Replies)
Discussion started by: dravi_laxmi
6 Replies
8. Shell Programming and Scripting
a=rhino
b=crocodil
c=testsc
if && "$c" = testsc ]
then
echo "Test #5 succeeds."
else
echo "Test #5 fails."
fi
i need to test or condition before check the output with AND condition. ur help is much appreciated... (11 Replies)
Discussion started by: gokulraj23
11 Replies
9. Shell Programming and Scripting
Hi ,
I am trying the following simple script . But it is always giving 1 output. Dont know why
#!/bin/sh
find . -name "a.log"
if ; then
echo "1"
else
echo "0"
fi
Kindly advice. it is giving 1 output even when the a.log file is not there (26 Replies)
Discussion started by: himvat
26 Replies
10. Shell Programming and Scripting
hi,
actully i need the belp for the below.
host_list=" Host1 host2 host3 host4 "
n=`hostname`
i need to put the condition like the below
if n is among the host mention in the host_list if
then
#some stugg
else
# some other stuff
fi (1 Reply)
Discussion started by: mail2sant
1 Replies