10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
this thread is a continuation from previous thread
https://www.unix.com/shell-programming-and-scripting/223901-split-big-file-into-multiple-files-based-first-four-characters.html
..I am using awk to split file and I have a syntax error while executing the below code
I am using AIX 7.2... (4 Replies)
Discussion started by: etldev
4 Replies
2. Shell Programming and Scripting
Hi i have a data file whcih contains the data as follows :
FH332OY86|AAABBB CCCC DDDA FHLMC 30 8.000|FHLMC|3|30|8.00000000|1986|26.29164289|3.29544844|0.00000000|10.05940539|107.50704264|Mar 8 2013 12:00AM|20130311|D|DA|DAA|DAAC|201302
FH332OY87|AAABBB CCCC DDDA FHLMC 30... (9 Replies)
Discussion started by: ptappeta
9 Replies
3. Shell Programming and Scripting
I want to match the number exactly from the variable which has multiple numbers seperated by pipe symbol similar to search in egrep.below is the code which i tried
#!/usr/bin/perl
my $searchnum = $ARGV;
my $num = "148|1|0|256";
print $num;
if ($searchnum =~ /$num/)
{
print "found";
}... (2 Replies)
Discussion started by: kar_333
2 Replies
4. Shell Programming and Scripting
Hi guys I'm using the following script to change input file format to another format. some where I'm getting the error. Could you please let me know if you find out?
cat input.txt|egrep -v ‘^#'|\ perl -ane ‘if (@F>3){$_=~/(chr.+):(\d+)\ s()/;print $1,”\t”,$2,”\t”,($2+35),”\n”}'\ > output.bed
... (1 Reply)
Discussion started by: repinementer
1 Replies
5. Shell Programming and Scripting
Hi there
if i run this from the BASH command line, i get a good result
# FS="my-box23/account"
# zfs list -t filesystem -H | cut -f1 |egrep "^ZPpool1/$FS$"
ZP0pool1/my-box23/account
which is great, however if I try to run in a perl script populating an array with the result/s, i get... (4 Replies)
Discussion started by: rethink
4 Replies
6. Shell Programming and Scripting
Hi,
I have a text file that is around 7Gb which is basically a matrix of numbers (FS is a space and RS is \n). I need the most efficient way of plucking out a number from a specified row and column in the file.
For example, for the value at row 15983, col 26332, I'm currently I'm using:
... (1 Reply)
Discussion started by: Jonny2Vests
1 Replies
7. UNIX for Dummies Questions & Answers
Ok, this may be very simple but I can't find a solution. I have a list of numbered values which I have grepped from a larger life.
ex/
1:7.54
2:4.52
3:3.22
4:2.11
5:3.59
6:4.36
7:6.88
8:12.28
9:13.37
10:15.6
11:17.66
12:14.25
I need a quick way to organize them (using awk?)... (4 Replies)
Discussion started by: jdolny
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
The input file "notifications" contains the following string.
FRTP has 149 missing batches
I want to search for :
FRTP has missing batches
As the number 149 is not important and will change.
The commands I have tried.
grep "FRTP has.*missing batches" notifications.txt... (3 Replies)
Discussion started by: whugo
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
Anyhelp on the following is highly appreciated
I have a flat file which contains entrys like this
L1 I1 B1 R1
L2 I2,I3 B1 R2
L3 I1 x R3
L4 x B2 R1
L5 I2 B1 R4
x means no entry
Now after reading the... (3 Replies)
Discussion started by: jingi1234
3 Replies
10. Shell Programming and Scripting
I am facing some strange problem.
I know, there is only one record in a file 'test.txt' which starts with 'X'
I ensure that with following command,
awk /^X/ test.txt | wc -l
This gives me output = '1'.
Now I take out this record out of the file, as follows :
awk /^X/ test.txt >... (1 Reply)
Discussion started by: videsh77
1 Replies