Search Results

Search: Posts Made By: vidyadhar85
2,861
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
5,156
Posted By vidyadhar85
You can use below mv...
You can use below


mv usr/sbin/appl/tmp/logfile.txt usr/sbin/appl/tmp/logfile_`date +"%d%b%y"`.txt
find usr/sbin/appl/tmp/logfile*.txt -mtime +21 -exec rm {} \ ;
Forum: Fedora 09-12-2013
6,657
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,353
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
8,918
Posted By vidyadhar85
Have you tried the sort command which I have...
Have you tried the sort command which I have provided above?
6,851
Posted By vidyadhar85
why arent u using sed? sed 's/$/;/g'...
why arent u using sed?


sed 's/$/;/g' filename
3,142
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 ----------...
8,918
Posted By vidyadhar85
sort -t, -k1,1 -u input.csv
sort -t, -k1,1 -u input.csv
1,622
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,737
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,871
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,299
Posted By vidyadhar85
try... awk...
try...

awk 'NR==FNR{v=$1;$1="";A[v]=$0;next}
{print $0" "A[$2]}' file2 file1
2,782
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,267
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,512
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,206
Posted By vidyadhar85
you are missing one closing curly bracket at the...
you are missing one closing curly bracket at the end.
1,635
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,424
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...
1,035
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...
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
Forum: Red Hat 07-04-2013
2,094
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,704
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,885
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,777
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))...
Showing results 1 to 25 of 100

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