Search Results

Search: Posts Made By: Optimus81
4,371
Posted By Optimus81
Thanks junior-helper for the help. Sorry i...
Thanks junior-helper for the help.

Sorry i was struck with imp release.

Now am back.

I tried what you said but it doesn't do anything, script just run and comeback.


admin@HP1 # cat...
4,371
Posted By Optimus81
Bash script to read a file from particular line till required line and process
Hi All,

Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool.

Wraper script am trying is to do with above metion 2...
877
Posted By Optimus81
Thanks Aia. logic works perfectly. this what I...
Thanks Aia. logic works perfectly. this what I was looking for and I was struggling to get pervious whole line.

Many Thank Again.
877
Posted By Optimus81
Print lines before after pattern meacted
Hi All,

Am trying to print pervious lines of the pattern matched, I was able to print pattern matched and the required data but don't know how to get the pervious line.



ifconfig -a...
2,115
Posted By Optimus81
Thanks Don. I tried it by myself, it...
Thanks Don.

I tried it by myself, it simple while loop did the trick..

Many Thanks..


#!/usr/bin/bash
while read line
do
#echo "Generating xml tag is :<typ:RequestKey...
2,115
Posted By Optimus81
Creating multiple xml tag lines in a file
Hi All,

Can someone tell me how can we create same xml tag lines based on the number of lines present in other file and replace the Name variable vaule present in other file.

basically I...
932
Posted By Optimus81
Script to automation utility app
Hi All,

Am trying to write a shell script to automate one of the product utility but am struck with how to send/key in the inputs and most importantly it requires to press "Enter" key every...
3,122
Posted By Optimus81
Command to extract word from a string
Hi All,

I have a word and from that word would like to search for certain set of string, is there any command to do so ?

EX :

Components

from the above word, would like to search for...
11,046
Posted By Optimus81
Thanks Guys for prompt response. Sorry for coming...
Thanks Guys for prompt response. Sorry for coming back late..

for me escaping with "\r" works fine.

Thanks vbe and all.
11,046
Posted By Optimus81
Script to check dos format in a file
Hi All,

I am trying to check if the file is in dos format using simple grep command but the problem is lines inside the file with have special characters in between and in some lines end of the...
7,181
Posted By Optimus81
Thanks Crontab. Sorry to reply very late. I was...
Thanks Crontab. Sorry to reply very late. I was out of station..

I did tried something to skip file checking which will be there in whitelist file but still not working.


#!/bin/sh
set -f...
7,181
Posted By Optimus81
Thanks, Now i don't see any error after adding \...
Thanks, Now i don't see any error after adding \ in the script.

Can you please tell how can we add a logic to skip finding ownership of the specific files by ready config file ?
7,181
Posted By Optimus81
Thanks Again but am getting error when i run the...
Thanks Again but am getting error when i run the script.


root@ttky # ./checkfileownership.sh /root/tools/bin root root
./checkfileownership.sh: root}: not found
./checkfileownership.sh: root}:...
7,181
Posted By Optimus81
Thanks MadeInGermany. The solution which...
Thanks MadeInGermany.

The solution which you gave is kind of working. Is there a way in which we can skip or leave if any of the file owner/group needn't to be checked.

I was thinking,...
7,181
Posted By Optimus81
Thanks MadeinGermany script works as...
Thanks MadeinGermany

script works as expected but I have a question, how can I check the owner, to which group belong to.

say from the script if i need to pass both owner and group to check on...
7,181
Posted By Optimus81
Script to check files ownership
Hi All,

I wanted to check the files ownership and permission based on the path given it as arguments thru script.

I was able to get the required command using ls but i would like this command...
4,659
Posted By Optimus81
Thanks Yoda. it worked. Can you tell me how...
Thanks Yoda. it worked.

Can you tell me how can i skip firs line(which is headerline) and the last line(blank line) while reading netstat -i command, otherwise i get "unary operator expected...
4,659
Posted By Optimus81
Thanks Yoda. Really SSH trick works but only...
Thanks Yoda. Really SSH trick works but only concern is that, is there way through script itself we can enter "yes" on times when its prompt from some server..

am talking about handling this when...
4,659
Posted By Optimus81
netstat command to be executed for list of hosts
Hi All,

Need to run the netstat -i command on the list of hosts and check if "Ierrs" and "Oerrs" has value greaterthan 0.
for Ex: below output, driver bge1 and bge3 has Oerrs and Ierrs value >...
1,047
Posted By Optimus81
Archieve one weeks old txt files
Hi All,

Am trying to write a script which does the archiving of *.txt files if it's one week old from the current date.

/TK/Project_ATT/Results/
File format :

-rw-r----- 1 root root ...
1,478
Posted By Optimus81
try removing opening and closing brackets in...
try removing opening and closing brackets in print stmt



print "$line.......\n";
6,729
Posted By Optimus81
Grep command output in tabular format
I have a grep command script which works fine and give the correct results but i wanted the output to be displayed in tabular format ? Is it possible to display
the output in tabular format and as...
6,752
Posted By Optimus81
Thanks krishmaths for quick response. your...
Thanks krishmaths for quick response.

your awk command prints only last column value but i need to have cpu number(column value next to date field) + last column value in the output

Can you...
6,752
Posted By Optimus81
Mpstat script output
I have a script which runs the mpstat and prints the output in a file. In order capture highest cpu ususage from the generated output file,
have to manually tail the output file and need to grab...
3,216
Posted By Optimus81
Shell script to calculate the max cpu usage from the main script
Hi All,
I have a script which does report the cpu usuage, there are few output parameter/fields displayed from the script. My problem is I have monitor the output and decide
which cpu number...
Showing results 1 to 25 of 67

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