10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have 2 files. File 1 is a daily file with only a bunch of IDs and a date column. File 2 has all the dump of IDs and their respective cost. I basically want an inner join. When I am picking a few rows from these files and joining, they work perfectly fine. But when I join the full files together,... (13 Replies)
Discussion started by: Varshha
13 Replies
2. Shell Programming and Scripting
Hi,
I have a simple awk script:
BEGIN{}
{
$a=$2-$1;
print $a
}
END{if(NR==0){
print "0"
}
}
to which I provide the following input
2.9 14
22.2 27 (4 Replies)
Discussion started by: jamie_123
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column).
I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies
4. UNIX for Dummies Questions & Answers
file1:
Toronto:12439755:1076359:July 1, 1867:6
Quebec City:7560592:1542056:July 1, 1867:5
Halifax:938134:55284:July 1, 1867:4
Fredericton:751400:72908:July 1, 1867:3
Winnipeg:1170300:647797:July 15, 1870:7
Victoria:4168123:944735:July 20, 1871:10
Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies
5. UNIX for Dummies Questions & Answers
Dear all,
I have two files (each only contains 1 column) as attached. I want to combined the two files and only show the common records in both files. But when I use join command only the last row was combined. Anyone know what is the problem? I don't know how to write the correct code to only... (2 Replies)
Discussion started by: forevertl
2 Replies
6. UNIX for Dummies Questions & Answers
Hi.
First post, and Linux newbie, so maybe I'm missing something obvious:
I have a Synology NAS that is run by a Linux distribution (which?). I have had an external hard drive connected to the NAS for making backups using Synology's backup application Time Backup.
Time Backup is based on... (3 Replies)
Discussion started by: Pokersut
3 Replies
7. Shell Programming and Scripting
Hi guyz
Excuse me for posting simple question
I tried join and sort and other perl commands but failed
I have 2 files. 1st file contain single column with around 6000 values (rows).
Second file contain 2 columns 1st column is the same column (in 1st file) but randomly ordered and second... (5 Replies)
Discussion started by: repinementer
5 Replies
8. Shell Programming and Scripting
Hi,
I am a new learner of join command. Some result really make me confused.
Please kindly help me.
input:
file1:
LEO oracle engineer 210375
P.Jones Office Runner ID897
L.Clip Personl Chief ID982
S.Round UNIX admin ID6
file2:
Dept2C ID897 6 years
Dept5Z ID982 1 year
Dept3S ID6 2... (1 Reply)
Discussion started by: summer_cherry
1 Replies
9. Solaris
Greetings To All!
I am running Solaris 10 in a sparc environment.
Here is the deal:
In /var/spool/cron/crontabs, there is a cron user named "sys". If I do a
crontab -l sys, it returns:
# 0 * * * 0-6 /usr/lib/sa/sa1
# 20,40 8-17 * * 1-5 /usr/lib/sa/sa1
# 5 18 * * 1-5 /usr/lib/sa/sa2... (8 Replies)
Discussion started by: RobSand
8 Replies
10. UNIX for Dummies Questions & Answers
I have a problem I don't understand... I am trying to declare a variable, and then output the results of that variable, couldn't be simpler
#!/bin/ksh
VAR='Oranges'
if
then
echo "Found Lemons"
elif
then
echo "Found Oranges"
fi
The output shouold clearly be "Found Oranges", but... (2 Replies)
Discussion started by: danhodges99
2 Replies