10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have two files
I need to compare these two files and take the lines that are common in both the files and consider the line present in second file for my further processing
I have used "Awk" along with "FNR and NR" but that is not working
gawk -F= '
> FNR==NR {a=$1; next};
> ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
2. UNIX for Dummies Questions & Answers
I have 2 files with exactly the same information (with header and separated by ";") and what I would like to do is print (for both files!) the columns that are different and also print the "key" column that is equal in the 2 files For example, if
File1:
key1;aaa;bbb;ccc
key2;ddd;eee;fff... (4 Replies)
Discussion started by: mvalonso
4 Replies
3. Shell Programming and Scripting
I'm working on a script that needs to execute only after directory B is equal in file count to directory A.
It needs to check dir B every 5 min or so and when the file count is equal to A, it executes a script.
I'm thinking of using wc -w but I'm not sure how to put it together.
Any help... (7 Replies)
Discussion started by: scribling
7 Replies
4. Shell Programming and Scripting
Here in the input file
23:59:13,devicename,21,server1,700
23:59:13,devicename,22,server2,200
23:59:13,devicename,23,server3,200
23:59:13,devicename,24,server4,200
23:59:13,devicename,25,server5,200
23:59:13,devicename,26,server6,200
23:59:13,devicename,27,server7,200... (6 Replies)
Discussion started by: necro98
6 Replies
5. Shell Programming and Scripting
could someone write a short script which is able to take a text file input and compare lines 1 and 2, 3 and 4, 5 and 6 ... ... until the end of the file. And to prompt if the lines are not equal.
Thank you! (10 Replies)
Discussion started by: c_lady
10 Replies
6. Shell Programming and Scripting
Hi, My Script looks like this
#! /bin/ksh
cd /usr/SrcFiles/ADD;
while read line
do
d=`echo $line|cut -d'.' -f1`
echo $d".XML" >> XML_File_List.txt
out=`echo "gunzip -c -S .ZIP $d.ZIP > $d.XML;"`
echo $out
per=`echo "chmod ugo+rwx $d.XML;"`
echo $per
done <ZIP_File_List.txt
and the... (5 Replies)
Discussion started by: naveen.kuppili
5 Replies
7. Shell Programming and Scripting
I have a command (not shell script) that general several lines of output like this...
scp /var/lib/mysql/jitu/email.* root@172.29.0.218:/root/pitu/
scp /var/lib/mysql/jitu/orders.* root@172.29.0.218:/root/pitu/
I tried adding xargs but it did not work. -exec was not tried because I guess it... (3 Replies)
Discussion started by: shantanuo
3 Replies
8. Shell Programming and Scripting
Hi,
As I have seen in this forum how to comment multiple lines in the script, but it does not work properly for me.
It is blocking the code but it does not execute the rest of the codes.
This is my code
#! /usr/bin/ksh
month='date +"m%"'
: << Comments Block
if ||
then
echo "inc =... (12 Replies)
Discussion started by: Yamini Thoppen
12 Replies
9. Shell Programming and Scripting
Hello, I am new to scripting and need some help. In looking at other posts on this forum, I came up with the following logic. I cannot figure out why I am getting names of files of the current directory in my echo output.
Scenario: message file has a line containing the version. Version.txt... (2 Replies)
Discussion started by: brdholman
2 Replies
10. Shell Programming and Scripting
I need to have an if statement in a script to run if there are certain processes running. Easiest way I can see to do this is to run a ps and grep the results based on what I am looking for:
$ ps -ef | grep wtrs
---
webtrend 5046 1 0 May 12 ? 0:28 /webtrends/versions/6.1/wtrs_ui... (6 Replies)
Discussion started by: LordJezo
6 Replies