Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.09 seconds.
Search: Posts Made By: itkamaraj
Forum: Shell Programming and Scripting Linux 08-22-2017
Replies: 3
Views: 463
Posted By itkamaraj
Hi, why dont you try in for loop. with some sleep...

Hi, why dont you try in for loop. with some sleep time enabled. change the SOURCE_DIR and DESTINATION_DIR values according to your source and destination folder

#!/bin/bash...
Forum: Shell Programming and Scripting Linux 08-16-2017
Replies: 11
Views: 1,150
Posted By itkamaraj
Another solution in awk. Just empty the first...

Another solution in awk. Just empty the first field and print the line

awk '{$1=""}1' input.txt
Forum: Shell Programming and Scripting Linux 08-16-2017
Replies: 3
Views: 358
Posted By itkamaraj
Not tested.. this script will check the...

Not tested..

this script will check the directory size is in GB and if its more than 50GB then it get the corresponding userid in for loop. implement your notification method in for loop
...
Forum: Shell Programming and Scripting Linux 08-08-2017
Replies: 12
Views: 594
Posted By itkamaraj
why dont you just change Mr. to Mr# using sed...

why dont you just change Mr. to Mr# using sed command then pass the file to awk command. later.. change Mr# to Mr.

can you give the sample input file and expected output file

sed 's/Mr\./Mr#/g'...
Forum: UNIX for Beginners Questions & Answers Linux 03-24-2017
Replies: 3
Views: 289
Posted By itkamaraj
If is not loop. Its conditional statement. I...

If is not loop. Its conditional statement.

I guess, APPEND is having string.

please try this

#!/bin/bash

echo -n "Enter the String : "
read APPEND
Forum: Shell Programming and Scripting Linux 01-05-2017
Replies: 6
Views: 445
Posted By itkamaraj
ha.. your script is big and not in readable...

ha.. your script is big and not in readable format.. sorry for that...

can you post sample input contents and the logic you are using and the expected output

how many files inside your <path> ?...
Forum: Shell Programming and Scripting Linux 01-05-2017
Replies: 9
Views: 634
Posted By itkamaraj
paste file1 file2 $ awk...

paste file1 file2

$ awk 'NR==FNR{a[NR]=$0;next}{print a[FNR],$0}' file1 file2
1 text1
2 text2
3 text3
4 text4
Forum: Shell Programming and Scripting Linux 12-30-2016
Replies: 4
Views: 275
Posted By itkamaraj
based on your given input and output. ...

based on your given input and output.

bash-4.1$ grep -o "<tr.*/tr>" a.txt
<tr><td>text </td> </tr>

bash-4.1$ sed "s#.*<tr#<tr#;s#/tr>.*#/tr>#" a.txt
<tr><td>text </td> </tr>
Forum: Shell Programming and Scripting Linux 12-27-2016
Replies: 11
Views: 703
Posted By itkamaraj
its based on the network bandwidth available...

its based on the network bandwidth available between 2 locations. currently i see it transfers 4.7Mb/Sec.

where is server A and B is located ?
Forum: What is on Your Mind? Linux 12-26-2016
Replies: 15
Views: 1,092
Posted By itkamaraj
Congrats Rudic ;)

Congrats Rudic ;)
Forum: What is on Your Mind? Linux 12-25-2016
Replies: 3
Views: 373
Posted By itkamaraj
wish you happy christmas and a new year :)

wish you happy christmas and a new year :)
Forum: Shell Programming and Scripting Linux 12-14-2016
Replies: 1
Views: 350
Posted By itkamaraj
is it octal number ? what is output of od -c...

is it octal number ?

what is output of od -c < filename

you can remove the control characters using tr command with [:cntrl:]

but it will remove the \r and \n.
Forum: Shell Programming and Scripting Linux 12-14-2016
Replies: 8
Views: 538
Posted By itkamaraj
$ awk -F\| '$1~/^[0-9]/{printf("\n%s...

$ awk -F\| '$1~/^[0-9]/{printf("\n%s ",$0);next}{printf("%s",$0)}END{print "\n"}' input.txt

113321|107|E|1|828|20|4032832|EL POETA|VILLALOBOS MIJARES PABLO NEPTALI RICARDO...
Forum: Shell Programming and Scripting Linux 12-13-2016
Replies: 2
Views: 279
Posted By itkamaraj
can you try this awk solution awk...

can you try this awk solution

awk '{if($0~/>$/){print;next}{printf("%s",$0)}}' input.txt
Forum: Shell Programming and Scripting Linux 12-09-2016
Replies: 10
Views: 511
Posted By itkamaraj
awk '($0 ~ /ERROR/ && $0!~/IGNORE/){Q=$0;next}...

awk '($0 ~ /ERROR/ && $0!~/IGNORE/){Q=$0;next} ($0 ~ /ID/){print Q ORS "There is Error for ID " $NF}' test.txt
Forum: Shell Programming and Scripting Linux 12-09-2016
Replies: 10
Views: 511
Posted By itkamaraj
change $1 to $0 awk '($1 ~...

change $1 to $0

awk '($1 ~ /ERROR/){Q=$0;next} ($0 ~ /ID/){print Q ORS "There is Error for ID " $NF}' Input_file
Forum: Shell Programming and Scripting Linux 12-08-2016
Replies: 2
Views: 433
Posted By itkamaraj
awk -F"\t" '{$2-=10;$3+=10;$4=$1":"$2"-"$3}1'...

awk -F"\t" '{$2-=10;$3+=10;$4=$1":"$2"-"$3}1' OFS="\t" input.txt
Forum: Shell Programming and Scripting Linux 12-08-2016
Replies: 4
Views: 314
Posted By itkamaraj
its wildcard refer more details from this...

its wildcard

refer more details from this link (http://www.robelle.com/smugbook/wildcard.html)

? any single character, except a leading dot
* zero or more characters, except a leading dot
[...
Forum: Shell Programming and Scripting Linux 12-08-2016
Replies: 1
Views: 372
Posted By itkamaraj
when you run this command, it gives the output...

when you run this command, it gives the output immediately ?

$BIN/sql.py "select * from reporting.V_AMSNB_OPT_PB_LOAD"
Forum: Shell Programming and Scripting Linux 12-08-2016
Replies: 10
Views: 511
Posted By itkamaraj
try with this.. awk '/ERROR/{err=$0}err &&...

try with this..

awk '/ERROR/{err=$0}err && /ID/{printf("%s\nThere is Error for %s : %s\n",err,$(NF-2),$NF);err="";}' input.txt
Forum: Shell Programming and Scripting Linux 12-08-2016
Replies: 10
Views: 511
Posted By itkamaraj
awk '/ERROR/{err=$0}err && /ID/{printf("%s\nThere...

awk '/ERROR/{err=$0}err && /ID/{printf("%s\nThere is Error for %s\n",err,$0);err="";}' input.txt
Forum: Shell Programming and Scripting Linux 12-02-2016
Replies: 4
Views: 432
Posted By itkamaraj
wild guess.. is it because of the $ in password ?...

wild guess.. is it because of the $ in password ?

mypass='Welcome$123'
Forum: Shell Programming and Scripting Linux 12-02-2016
Replies: 2
Views: 277
Posted By itkamaraj
try this... awk...

try this...

awk 'NF<2{$0="NAME;"$0"\tfailed"}1' incomplete_case_list
aname val
NAME;r'(1,) 3.28584
NAME;r'(2,) failed
NAME;r'(3,) 6.13003
NAME;r'(4,) 4.18037
NAME;r'(5,) ...
Forum: Shell Programming and Scripting Linux 11-29-2016
Replies: 3
Views: 285
Posted By itkamaraj
perl -lane 'print ($F[1]+$F[2])*$F[3]' inputfile

perl -lane 'print ($F[1]+$F[2])*$F[3]' inputfile
Forum: Shell Programming and Scripting Linux 11-29-2016
Replies: 6
Views: 1,312
Posted By itkamaraj
if you have gawk, then you can use FPAT variable...

if you have gawk, then you can use FPAT variable to split the data.

The GNU Awk User’s Guide (https://www.gnu.org/software/gawk/manual/gawk.html#Splitting-By-Content)
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 02:58 PM.