Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.09 seconds.
Search: Posts Made By: RavinderSingh13
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 11
Views: 275
Posted By RavinderSingh13
Hello gnnsprapa, Apologies, in hurry I...

Hello gnnsprapa,

Apologies, in hurry I missed it. Please try following and let me know if this helps you.

awk 'END{split(FILENAME, array,"_");print array[1] "_" array[2]}'...
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 11
Views: 275
Posted By RavinderSingh13
Hello gnnsprapa, Could you please try...

Hello gnnsprapa,

Could you please try following and do let me know if this helps you.

awk 'END{split(FILENAME, array,"_");print array[1] array[2]}'...
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 5
Views: 246
Posted By RavinderSingh13
Hello echo manolis, Could you please try...

Hello echo manolis,

Could you please try following and let me know if this helps you.

awk...
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 5
Views: 246
Posted By RavinderSingh13
Hello echo manolis, Could you please try...

Hello echo manolis,

Could you please try following and let me know if this helps you.

awk '{match($0,/ARC=[0-9]+/);val1=substr($0,RSTART,RLENGTH);match($0,/IDE=[0-9]+/);print...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 6
Views: 338
Posted By RavinderSingh13
Hello echo manolis, Following sed solution...

Hello echo manolis,

Following sed solution may also help you in same in case your Input_file has 6 columns(mentioned by you in your post).

sed...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 9
Views: 389
Posted By RavinderSingh13
Hello Jag_1981, If your Input_file is same...

Hello Jag_1981,

If your Input_file is same as shown sample then following may help you in same too.

awk '{printf("%s%s",$0~/^"/?(FNR==1?"":RS):FS,$0)} END{print ""}' Input_file


Thanks,...
Forum: Shell Programming and Scripting Linux 12-15-2017
Replies: 2
Views: 369
Posted By RavinderSingh13
Hello gowthamsoft, Could you please try...

Hello gowthamsoft,

Could you please try following and let me know if this helps you.

awk -F"|" 'FNR==NR{a[$2,$3]=$NF;next} (($2,$3) in a){print $1,$2,$3,a[$2,$3]-$NF}' SUBSEP="" File1 OFS="|"...
Forum: Shell Programming and Scripting Linux 12-15-2017
Replies: 5
Views: 825
Posted By RavinderSingh13
Hello vivekn, Could you please try following...

Hello vivekn,

Could you please try following and let me know if this helps.

awk -F":" 'FNR==1{split($0,a,":");sec1=a[1]*3600+a[2]*60+a[3]}...
Forum: Shell Programming and Scripting Linux 12-15-2017
Replies: 5
Views: 825
Posted By RavinderSingh13
Hello vivekn, Could you please let me...

Hello vivekn,

Could you please let me know if following helps you on same.

awk -F":" 'FNR==1{split($0,a,":");sec1=a[1]*3600+a[2]*60+a[3]}...
Forum: UNIX for Beginners Questions & Answers Linux 12-13-2017
Replies: 2
Views: 200
Posted By RavinderSingh13
Hello newbie_01, On a Solaris/SunOS...

Hello newbie_01,

On a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk , /usr/xpg6/bin/awk.

Thanks,
R. Singh
Forum: AIX Linux 12-12-2017
Replies: 1
Views: 204
Posted By RavinderSingh13
Hello vithal, Welcome to forums :b:. ...

Hello vithal,

Welcome to forums :b:.

For dealing with slowness kind of issues on O.S or DB level needs to debug on many aspects. So as a starting point, could you please do following once.
...
Forum: UNIX for Beginners Questions & Answers Linux 12-12-2017
Replies: 2
Views: 185
Posted By RavinderSingh13
Hello DallasT, Considering that your actual...

Hello DallasT,

Considering that your actual Input_file is same as shown sample Input_file, could you please try following and let me know if this helps you.

awk -v s1="'" -v s2="," 'val{printf...
Forum: Shell Programming and Scripting Linux 12-12-2017
Replies: 5
Views: 244
Posted By RavinderSingh13
Hello Corona688, Apologies, if I got it...

Hello Corona688,

Apologies, if I got it wrong here(though I know you need with print trying to suggest it with printf), I believe we could do this by printf like(examples here only):

awk -v...
Forum: UNIX for Beginners Questions & Answers Linux 12-04-2017
Replies: 3
Views: 217
Posted By RavinderSingh13
Hello Xterra, Could you please try following...

Hello Xterra,

Could you please try following and let me know if this helps you.

awk 'FNR==NR{a[$1];next} ($1 in a)' Input_file1 Input_file2
Output will be as follows.
...
Forum: UNIX for Beginners Questions & Answers Linux 12-01-2017
Replies: 4
Views: 143
Posted By RavinderSingh13
Hello Gussifinknottle, Could you please try...

Hello Gussifinknottle,

Could you please try following and let me know if this helps you.

awk 'FNR==NR{a[$1]=$0;next} !($1 in a)' File.B File.A

Thanks,
R. Singh
Forum: Shell Programming and Scripting Linux 11-16-2017
Replies: 2
Views: 245
Posted By RavinderSingh13
Hello genome, Since you haven't shown us...

Hello genome,

Since you haven't shown us sample Input_file so based on seeing your code, could you please try following and let me know if this helps you.

awk -F, 'BEGIN{
print "my being...
Forum: Shell Programming and Scripting Linux 11-15-2017
Replies: 10
Views: 320
Posted By RavinderSingh13
Hello ranjancom2000, Could you please try...

Hello ranjancom2000,

Could you please try following and let me know if this helps you.

awk '/^Device Symmetrix Name/{next} /^ +Device Symmetrix Name/{flag=1;if(ac_flag){print ""};sub(/^...
Forum: Shell Programming and Scripting Linux 11-14-2017
Replies: 3
Views: 245
Posted By RavinderSingh13
Hello kumar85shiv, Please use CODE TAGS as...

Hello kumar85shiv,

Please use CODE TAGS as per forum rules for commands/codes/Input_file samples which you are using into your post.
Could you please try following and let me know if this helps...
Forum: Shell Programming and Scripting Linux 11-14-2017
Replies: 2
Views: 242
Posted By RavinderSingh13
Hello SkySmart, Could you please try...

Hello SkySmart,

Could you please try following and let me know if this helps.(test with only provided sample).

echo '/var/FTPROOT/px/sci/archive/20171102070057904-DY_DC04_Daily Inventory...
Forum: UNIX for Beginners Questions & Answers Linux 11-09-2017
Replies: 19
Views: 461
Posted By RavinderSingh13
Hello LJJ, Could you please go through...

Hello LJJ,

Could you please go through following explanation and let me know if this helps you.

awk -F"~" '{ ##Making field separator as ~ here for each line of Input_file.
i=NF; ...
Forum: UNIX for Beginners Questions & Answers Linux 11-09-2017
Replies: 19
Views: 461
Posted By RavinderSingh13
Hello LJJ, Welcome to forums, please use...

Hello LJJ,

Welcome to forums, please use code tags for your Input_file/commands/codes as per forum rules.
Could you please try following and let me know if this helps you.

awk -F"~"...
Forum: UNIX for Advanced & Expert Users Linux 11-05-2017
Replies: 2
Views: 293
Posted By RavinderSingh13
RedHat Regarding rsync issue.

Hello All,

I was performing a data copy by using rsync command as follows.

rsync -avz -r -e 'ssh' --rsync-path=/usr/bin/rsync /test/singh_directory/dir /test/singh_directory >>...
Forum: Shell Programming and Scripting Linux 11-02-2017
Replies: 2
Views: 315
Posted By RavinderSingh13
Hello sidnow, Could you please try following...

Hello sidnow,

Could you please try following and let me know if this helps you.

awk 'BEGIN{
print "DateTime Address Age Name"
}
/^}/{
print date1,add,age,name;
...
Forum: Shell Programming and Scripting Linux 11-02-2017
Replies: 4
Views: 349
Posted By RavinderSingh13
Hello ranjancom2000, Could you please try...

Hello ranjancom2000,

Could you please try following.

sed 's/N\/A/,/;s/RW/,/' Input_file
Thanks,
R. Singh
Forum: Shell Programming and Scripting Linux 11-02-2017
Replies: 5
Views: 310
Posted By RavinderSingh13
Hello Sumanthsv, Please always do show us...

Hello Sumanthsv,

Please always do show us your efforts, as we all are here to learn and help each other.
Could you please try following and let me know if this helps you.

awk...
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 03:43 PM.