10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have two csv files of different sizes. The output file needs to have file1 contents on top of file2 contents where file2 col1 is >= to file1 col1, and file2 col1(same value) is < file1 col1 (next value). So basically, some file2 rows will be matched to the same file1 row because it is the closet... (7 Replies)
Discussion started by: aachave1
7 Replies
2. Shell Programming and Scripting
Why does this cause an infinite loop?
#!/bin/bash
while ]; do
echo "$(ipcs | awk '{print $2}')"
done
echo
exit 0
I have verified I eventually get Semaphore so it should break out of the while loop.
$ echo $(ipcs | awk '{print $2}')
Shared shmid 262145 294914... (6 Replies)
Discussion started by: cokedude
6 Replies
3. Shell Programming and Scripting
Hello,
I need to put the following string to the beginning of a file - but it should not create a newline at the end of the string.
So, the file I have is a compressed one - with gzip.
And I would like to add an ASCII-String to the beginning of the file. The string has a length of 69... (5 Replies)
Discussion started by: API
5 Replies
4. Shell Programming and Scripting
I am having two csv files i need to compare these files and the output file should have the information of the differences at the field level.
For Example,
File 1:
A,B,C,D,E,F
1,2,3,4,5,6
File 2:
A,C,B,D,E,F
1,2,4,5,5,6
out put file: (12 Replies)
Discussion started by: karingulanagara
12 Replies
5. Shell Programming and Scripting
Hi ,
can someone help me how to make an AWK code for splitting a string of equal parts of 500 chars in while loop?
Thank you! (4 Replies)
Discussion started by: sanantonio7777
4 Replies
6. Shell Programming and Scripting
Hi,
I have a table in unix from which i want to read the contents line by line, then filter out the values from 6th column one by one and compare it a fixed value.
How to do this? (7 Replies)
Discussion started by: arijitsaha
7 Replies
7. Shell Programming and Scripting
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies
8. Shell Programming and Scripting
Hi all
I am trying to scan a file that has 3 columns:
red blue 123351
red blue 848655
red blue 126354
red blue 023158
black white 654896
red blue 650884
I want an output that sums the rows that have matching columns 1 and 2 :wall:
red blue has 5 entries
black white has 1 entry
... (4 Replies)
Discussion started by: reno
4 Replies
9. Shell Programming and Scripting
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Discussion started by: jimmy_y
0 Replies
10. Shell Programming and Scripting
Hi,
Suppose in some directory (/APPS/TEST) I have a file ABCTEST.csv. I want to write a IF condition in which I want to check if filename contains the string ABC then I will do certain operations .
I have a variable having value as /APPS/TEST/ABCTEST.csv
How Can I achieve this...please... (14 Replies)
Discussion started by: vishalaksha
14 Replies