Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: vidyadhar85
1,589
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
2,606
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
4,756
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)
1,701
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
7,393
Posted By vidyadhar85
Have you tried the sort command which I have...
Have you tried the sort command which I have provided above?
2,639
Posted By vidyadhar85
why arent u using sed? sed 's/$/;/g'...
why arent u using sed?


sed 's/$/;/g' filename
2,543
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 ----------...
7,393
Posted By vidyadhar85
sort -t, -k1,1 -u input.csv
sort -t, -k1,1 -u input.csv
1,136
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,045
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
2,499
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`...
899
Posted By vidyadhar85
try... awk...
try...

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


awk -F"," '{gsub("/","\",\"",$2);OFS=","}1' filename
1,483
Posted By vidyadhar85
there is no not command in ksh. try ! or test
there is no not command in ksh. try ! or test
1,290
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
2,843
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...
1,543
Posted By vidyadhar85
you are missing one closing curly bracket at the...
you are missing one closing curly bracket at the end.
1,341
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...
5,642
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...
741
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...
599
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
1,532
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>>
15,188
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...
2,703
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"|"...
12,181
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

 

Featured Tech Videos

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