10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
OS: window 7
shell : korn shell
I have 2 file , i'm need grep data according File_1 from file 2.
File_1
CAL_ENAB_N_4_
$2N12743_29
+12V
File_2
NODE CAL_ENAB_N_4_
PINS
21548;
PROBES
P1465 3651, 46900 tn2700.1 LWT;
WIRES (6 Replies)
Discussion started by: kttan
6 Replies
2. Shell Programming and Scripting
I have an if condition. If that condition is true then one script will be run and after that I need to check another condition based on the output value of first script.
i tried like below :
cd lock
if ; then
rm exitup
if ; then
kb_shutdown
kb_startup
if ; then
rm exitup
if ;... (3 Replies)
Discussion started by: charanarjun
3 Replies
3. Shell Programming and Scripting
Hi guys,
I need to read following lines and put them in same row ….
text: Abcd5437_XYA0_B1_WXYZ_BE
99:00:14:42:55:01:d4:22
99:00:14:42:70:01:d4:22
99:00:14:42:55:03:a0:22
99:00:14:42:70:03:a0:22
... (4 Replies)
Discussion started by: dc@bos
4 Replies
4. Shell Programming and Scripting
Hi,
I wanted to satisfy two requirements to proceed to do a task
One of them is to calculate between two metrics and the other to check one of the file not empty
if the condition matches the above two, it should proceed with the task
below is the snippet of it, however when i run the script... (3 Replies)
Discussion started by: ajothi
3 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I am trying to put multiple conditions in an IF Statement (using $$). the Linux script somehow doesnt like it. The logic I am trying to implement is as follows,
1. I will first search for DateFile.txt
2. If it exists & there is a P_BUS_DATE value in it, then assign the date value... (5 Replies)
Discussion started by: dsfreddie
5 Replies
6. Shell Programming and Scripting
Hi everybody,
I had 10 files in in one folder(/home/sai/) namely sai.
1.gz,2.gz,3.gz ..,10.gz.
I want to delete the files which are there home based on the following conditions
fliecount in sai folder==10 && grep -cv ".gz"==0
How to check this using awk?
Otherwise please... (2 Replies)
Discussion started by: p_sai_ias
2 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to check if two variables have value assigned to it.
i am doing it like
if ]
then
echo "Please specify either single hostname or host file for the report"
usage
exit
fi
But its not working for it.Even i specify values for both variables it dont go... (6 Replies)
Discussion started by: kailash19
6 Replies
8. Shell Programming and Scripting
Hi ,
I have a peculiar problem.
i have an if block like this
if ;
then
echo " todays date is " ${date} >> log_file
echo " file count is " $ count >> log_file
mv filename1 filename 2
else
echo "no files available ">> log_file
fi
the echo statement "no files available " is not... (2 Replies)
Discussion started by: wizardofoz
2 Replies
9. Shell Programming and Scripting
Hi Guys,
I just wanted to print all the lines execpt 1st and 3rd line. For that i wrote a awk command,
awk 'NR != 1 || NR != 3 {print $0}' c.out
the command is working if i give an equal to instead of not equal to.
In the case of not equal to, it gives me the entire file.
Can you... (18 Replies)
Discussion started by: mac4rfree
18 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I would like to create an IF statement where if a variable is equal to at least one of 2 (or more) values then the script proceeds. For example:
TEST_VAR=2
if ; then
echo success!
else
echo failure
fi
I understand that the above syntax is wrong but I feel it must be close. Any... (1 Reply)
Discussion started by: msb65
1 Replies