10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I want to compare a value from test file and redirect the o/p value to the same file
input file
250 32000 32 128
Below is my code
awk '{ if ($1 < "300") print $1 > /tmp/test}' test
want to compare 250 < 300 then print 300 to the same place
below is the... (24 Replies)
Discussion started by: stew
24 Replies
3. Programming
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies
4. Shell Programming and Scripting
Hi All,
The script below read the path and searches for the directories/subdirectories and for the files. If files are found in the sub directories then read the content of the all files and put the content in csv(comma delimted) format and the call the write to xml function to write the
std... (1 Reply)
Discussion started by: Optimus81
1 Replies
5. Shell Programming and Scripting
Hi.
I am new to scripting and could really do with some advice on the best way to put a script together. Here is the scenario I am working to;
- i will get files via ftp to a tmp directory on the server
- all files will have a unique file name but with the same extension (.USM)
- for each... (5 Replies)
Discussion started by: yabai
5 Replies
6. Shell Programming and Scripting
Hi All,
I am hoping someone can help me with some scripting I need to complete using AWK.
I'm trying to process multiple fixed files to generate one concatenated fixed file in a standard format.
The Input file is:-
aaaa bbbbb ccccc 1 xxxx aaa bbb
aaaa bbbbb ccccc 2 abcd aaa CCC... (9 Replies)
Discussion started by: jason_v_brown
9 Replies
7. Shell Programming and Scripting
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies
8. Shell Programming and Scripting
Hi,
i am new to awk. I am using csv2pipe script(shown below)
BEGIN { FS=SUBSEP; OFS="|" }
{
result = setcsv($0, ",")
print
}
# setcsv(str, sep) - parse CSV (MS specification) input
# str, the string to be parsed. (Most likely $0.)
# sep, the separator between the values.
#
#... (6 Replies)
Discussion started by: bhaskarjha178
6 Replies
9. Shell Programming and Scripting
nawk -F, 'FNR==NR{a= $3 ;next} $2 in a{print $1, 'Person',$2, a}' OFS=, filea fileb
Input filea
Input fileb
output i am getting : (2 Replies)
Discussion started by: pinnacle
2 Replies
10. Shell Programming and Scripting
Hi,
I am trying to do the following using AWK program.
1. Read the input data file
2. Parse the record and see if it contains errors
3. If the record contains errors, then write it into Reject file, else, write into usual output file or display it on the screen
Here is what I have done -... (6 Replies)
Discussion started by: vidyak
6 Replies