Search Results

Search: Posts Made By: vidyadhar85
2,884
Posted By vidyadhar85
If you have latest grep you have below options in...
If you have latest grep you have below options in grep
Context Line Control


or you can use awk


awk 'c-->0;/pattern/{c=98}' Infile
Forum: Fedora 09-12-2013
6,691
Posted By vidyadhar85
Its not an easy question to answer :) you...
Its not an easy question to answer :)

you can start with below link..

List of operating systems - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/List_of_operating_systems)
2,359
Posted By vidyadhar85
You can use awk command to get the desired...
You can use awk command to get the desired output.. regarding ??? not sure what inbtw process happening in your script..


awk '{print $1" "$1" "$4}' Input1.txt
6,864
Posted By vidyadhar85
why arent u using sed? sed 's/$/;/g'...
why arent u using sed?


sed 's/$/;/g' filename
8,931
Posted By vidyadhar85
Have you tried the sort command which I have...
Have you tried the sort command which I have provided above?
8,931
Posted By vidyadhar85
sort -t, -k1,1 -u input.csv
sort -t, -k1,1 -u input.csv
3,158
Posted By vidyadhar85
redirect the output of your top command to a file...
redirect the output of your top command to a file and start that as background process run sleep for 5 mins and then kill the background process.

---------- Post updated at 02:19 PM ----------...
1,628
Posted By vidyadhar85
try.. awk '{lines[NR] =...
try..


awk '{lines[NR] = $0}!/>/&&length($0) < 11 {print lines [NR-1]; print lines [NR]} ' example.txt
3,743
Posted By vidyadhar85
try to put the full path here ...
try to put the full path here

LOG_FILE=/arbor/integ_fx/rahul_raj/itsr_5652/error.log
3,877
Posted By vidyadhar85
looking at your req i suggest you using or...
looking at your req i suggest you using
or else it should be

vidya> v=date
vidya> echo `$v`
Mon Jul 22 12:00:44 CEST 2013
vidya> echo `$v`
Mon Jul 22 12:00:48 CEST 2013
vidya> echo `$v`...
1,301
Posted By vidyadhar85
try... awk...
try...

awk 'NR==FNR{v=$1;$1="";A[v]=$0;next}
{print $0" "A[$2]}' file2 file1
2,789
Posted By vidyadhar85
how about below.. awk -F","...
how about below..


awk -F"," '{gsub("/","\",\"",$2);OFS=","}1' filename
2,203
Posted By vidyadhar85
there is no not command in ksh. try ! or test
there is no not command in ksh. try ! or test
2,269
Posted By vidyadhar85
u can.. but bit messy though awk...
u can.. but bit messy though


awk '{v=substr($0,45,22);sub(/[ ]+/," ",v);print substr($0,0,44) v substr($0,68)}' filename
3,520
Posted By vidyadhar85
My fav for this is.. awk...
My fav for this is..


awk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r[(NR-c+1)%b];print;c=a}b{r[NR%b]=$0}' b=0 a=2 s="ACCOUNT" require.txt


b is number of lines above pattern and a is...
2,207
Posted By vidyadhar85
you are missing one closing curly bracket at the...
you are missing one closing curly bracket at the end.
1,636
Posted By vidyadhar85
you have to use the named pipes for this.. ...
you have to use the named pipes for this..


mkfifo out.pipe err.pipe
exec 3>&1 4>&1
tee Menu_`date +"%d-%m-%Y"`.log < out.pipe >&3 &
pid_out=$!
exec 1>out.pipe
tee Menu_`date...
7,441
Posted By vidyadhar85
you can try ignoring the directory ...
you can try ignoring the directory


find ./ -type d \( ! lost+found \) -type f -name "*.csv" -mtime +6 -exec rm -f {} \;

if you consider it as warning messages

redirect the find output...
809
Posted By vidyadhar85
try.. awk -F,...
try..


awk -F, '{if($3=="win"){A[$1","$2]++}else{B[$1","$2]++}}END{for(i in A){print i","A[i]"win,"B[i]"lose"}}' filename
1,037
Posted By vidyadhar85
are you using bash? if yes below can be...
are you using bash?

if yes below can be used

${parameter^} # Convert the first character in ${parameter} to uppercase
${parameter^^} # Convert all characters in ${parameter} to...
Forum: Red Hat 07-04-2013
2,111
Posted By vidyadhar85
add below line to your .profile file (I am still...
add below line to your .profile file (I am still unsure about your requirement)


export PATH=$PATH:<<your application installed path>>
18,713
Posted By vidyadhar85
Pleas read my reply to your thread.. since you...
Pleas read my reply to your thread.. since you are piping the out put to while it will open a subshell and variable value would be lost once its back to main shell

use
while read line ; do
blah...
4,891
Posted By vidyadhar85
in your script define 2 variables (you can...
in your script define 2 variables (you can directly feed also to awk)

file1=Aggr_New_`date --date='yesterday' +"%m_%d_%Y"`_*.txt
file2=Aggr_New_`date +"%m_%d_%Y"`_*.txt
awk -F"|"...
15,791
Posted By vidyadhar85
try below code.. save it in script called banner...
try below code.. save it in script called banner and enjoy :)


#!/bin/ksh93
# or #!/bin/bash

A=$((1<<0))
B=$((1<<1))
C=$((1<<2))
D=$((1<<3))
E=$((1<<4))
F=$((1<<5))
G=$((1<<6))...
1,683
Posted By vidyadhar85
try.. awk '{gsub("_"," ",$3)}1' ...
try..

awk '{gsub("_"," ",$3)}1' filename
Showing results 1 to 25 of 100

 
All times are GMT -4. The time now is 04:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy