Separating columns via multiple spaces...
awk -F '[[:space:]][[:space:]]+' '{ print $1, $7"/"$6, $12 }'
Each column of data will have multiple data separated by spaces..
Not sure how to print out only the first 3 items in $12....
Any idea's
Thanks....
Joe Despres
I need to scan through 28 files ::--->
/bin/ls -alt $SDIR/*$IDENTIFIER*log|awk '{print $9}'|grep Celerra.avtar.log | tee $ALL > $FILESLOG
And I want to pull out multiple items from each file ::--->
for i in `cat $FILESLOG`
do
echo -e "/bin/grep "<5905>" $SDIR/$i | awk '{print $1, $11}' \c"...
I'm trying to create a colorful help for all the functions I'm creating...
I have the following ::--->
gethelp () {
cat << EOF
act ::---> Get one or more clients activity. act <Client_name or Client_list>
his ::---> Get one or more client backup history. his <Client_name or Client_list>...
Trying to get the following code to work....
DATE=`date +%Y-%m-%d -d "yesterday"`
for i in `cat IR_clients.txt`
do
echo -e "$i \c"
mccli activity show --name=$i|grep -i $DATE | if [ $? -ne 0]; then
echo -e "\n"
else
cut -c 17-38 |awk 'BEGIN {RS="="} $1=$1'
fi
done
Looping thru a list...
I have a line of data thats pretty long...
I would like to break this data up ...
I would like to insert a carriage return line feed between the following two characters
><
This will make looking at the data a bit better!
Thanks...
Joe Despres
I would like to perform the following on the output of a command ::--->
Remove the top 5 lines..........
Remove the bottom 2 lines....
Reverse line order
I created the following sed file ::--->
1,5d
N;$!P;$!D;$d
1!G;h;$!d
command | sed -e cleanup.sed
Doesn't seem to work....
Any ideas...
I would like to get the past 30 days dates in the following format ::--->
mm/dd/yy
I tried the function thats in the FAQ area. It works some what. But for some reason it doesn't go all the way back..
export TODAY=`GetDate 0 '+%m/%d/%y'`
export Day1=`GetDate -1 '+%m/%d/%y'`
export...
I'm attempting to loop tru a two column file with 38 lines of data.....
1st column = CLIENT
2nd column = GRID
cat file | while CLIENT GRID
do
echo "**************** $GRID $CLIENT ****************"
ssh admin@$GRID /usr/local/avamar/bin/mccli activity show --name=$CLIENT
done
It processes the...
I would like to print everything between two points....
From CLIENT --- to ---> 2nd blank line
CLIENT = SantaCluas
blank_line
data
data
data
data
data
data
blank_line
I know how to between CLIENT --- to ---> 1st blank line..
But not to 2nd blank_line...
Thanks,
Joe Despres
I'm on the lookout for a package to help me manage multiple unix systems from Ubuntu on my PC. for about 15 Solaris systems. I cannot communicate to all systems directly!
I can perform multiple hops via one command to get to the systems I don't have direct access to...
Is there a...
Master = 6.5.4 HPUX 11.11 4 lto2(s)
Media = 6.5.4 HPUX 11.11 4 lto3(s)
Each system has two nfs mounts to basic disk [Data Domain]
I have setup a test policy to send backup(s) to both Basic Disk and tape...
Unfortunately it seems I can only send one stream at a time to tape when I do...
I would like to find out if the "nolock" option can be used on a hpux 11.11 system to mount NFS filesystems?
I think I need it to configure a Data Domain as basic disk in NetBackup 6.5.4
Ref: http://www.radiantresources.com/mydocuments/datadomainsymantecnetbackupbestpractices.pdf
Thanks...
I'm having problem using my aliases within a a for loop...
Bash....
for server in `[ -f $* ] && cat $* || echo $*`
do
##### Generate the data.....
$server "/usr/openv/volmgr/bin/vmoprcmd -devmon ds -no_format" 2>/dev/null > /home/pubuntu/${server}_drivestatus.txt
$server...
I would like to process the output of nslookup...
Here's what comes up ::-->
nslookup Server
Server: DNS_server
Address: xx.xx.xx.xx
Name: Server_Name
Address: yy.yy.yy.yy
I would like to generate the following output to look like this ::--->
Server Server_Name yy.yy.yy.yy
I've...
I have the following for loop ::--->
nbqueryname () {
for i in `cat $1`
do
echo "$i \c"
bpgetconfig -M $i | grep "^CLIENT_NAME"
done
}
I would like t make $1 either a single name or a file with multiple names...
Right now it's setup to take a file with multiple names...
How can I make it...
I would like to search a file for "Tape_Pool_name" then print out the data between the two blank lines.....
Tape_Pool_name
Blank Line
Data
Data
Data
Data
Data
Data
Blank Line
Thanks...
Joe Despres
I would like to print between the following:
"filename scanned"
#################
Media Log entries
#################
Print anything between these two........
##############
Tape Pool info
##############
And not print the top or bottom headers..
I have the following so far:
/Media Log...
I would like to rearrange a data file that looks like:
server1 policy1 policy2
server2 policy3
server3 policy1 policy3
to look like:
server1 policy1
server1 policy2
server2 policy3
server3 policy1
server3 policy3
How can I do this with awk?
Thanks..
Joe Despres
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.