10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk to check if each $2 in file1 falls between $2 and $3 of the matching $4 line of file2. If it does then in $5 of file2, exon if it does not intron. I think the awk below will do that, but I am struggling trying to is add a calculation that if the difference is less than 10,... (27 Replies)
Discussion started by: cmccabe
27 Replies
2. UNIX for Beginners Questions & Answers
Hi, input data format:
echo ' <APPLICATION="APPLSG" SUB_APPLICATION="DLY" JOBNAME="DPL_BN_RE_CCMS_SA" CMDLINE="run_job.ksh %%PARAM1 %%PARAM2" TASKTYPE="Command" />'
expected format:
"APPLSG", "DLY", "DPL_BN_RE_CCMS_SA", "run_job.ksh %%PARAM1 %%PARAM2"
my command:
echo ' ... (2 Replies)
Discussion started by: JSKOBS
2 Replies
3. UNIX for Dummies Questions & Answers
Hi !
input:
111|222|333|aaa|bbb|ccc
999|888|777|nnn|kkk
444|666|555|eee|ttt|ooo|ppp
With awk, I am trying to change the FS "|" to "; " only from the 4th field until the end (the number of fields vary between records).
In order to get:
111|222|333|aaa; bbb; ccc
999|888|777|nnn; kkk... (1 Reply)
Discussion started by: beca123456
1 Replies
4. Shell Programming and Scripting
Hi guys, i have an executable file that contains several records and fields. One of the records has a variable filed that must be changed each time i want to execute the file. Would it be possible that i can use a loop to change the value of that field? Suppose that the field address is:
Record... (5 Replies)
Discussion started by: saeed.soltani
5 Replies
5. Shell Programming and Scripting
Is there a way I could use different a different field seperator for different parts of the body?
kinda like
{FS = ":"}
FILENAME == "products"{
price = $3
if(numprods < $1-100)
numprods = $1-100
}
{FS = "/"}{}
FILENAME == "associates"{
associateid... (5 Replies)
Discussion started by: angermanaged
5 Replies
6. Shell Programming and Scripting
"355"|""|"NJ"|"A0A 1W0"|"V"|""|""|""|"N"
I've the above sample data seperated with pipe delimeter and in the file I want to replace a space with "|" to the 4th field so the result would be like below. So it would change from 9 fields to 10 fields.
"355"|""|"NJ"|"A0A"|"1W0"|"V"|""|""|""|"N"
... (3 Replies)
Discussion started by: rudoraj
3 Replies
7. Shell Programming and Scripting
Hi all,
Can anybody think of a way to do this? I have a file with content like the following:
F_TOP_PARAM_VALUEF_TOP_SOURCEF_TOP_DEL_NOTIFICATIONF_DEST_ADDRF_TOP_DEL_TYPE
What I want to do is print out the value in the square brackets after F_TOP_SOURCE. So in this case I'd like to print... (4 Replies)
Discussion started by: Donkey25
4 Replies
8. Shell Programming and Scripting
Hi,
How do i Print anything after a ':'
Ex :
file1: 1235131(rs32553)
I want to print out "1235131(rs32553)"
how do i do it. I know we can do this using awk but looking for the right syntax.
Any help appreciated.
Thanks,
Ram (7 Replies)
Discussion started by: ramky79
7 Replies
9. UNIX for Advanced & Expert Users
Hai
I am using
bash-2.03$ bash --version
GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
I am not able to use gawk command its showing command not found , why ?
Eg:
awk 'NR==1' fix.txt | gawk 'BEGIN { FIELDWIDTHS = "3 2" } { printf($1"|"$2); }'... (8 Replies)
Discussion started by: tkbharani
8 Replies
10. Shell Programming and Scripting
I wrote a script on HPUX 11.11 to turn a Decimal subnet mask (255.255.254.0) to hex 0xfffffe00 (subset of a bigger script). It works great on the HPUX systems but on the freebsd box the awk is not seperating the fields properly. I tried to google for a solution and seaching these forums i am just... (3 Replies)
Discussion started by: insania
3 Replies