Search Results

Search: Posts Made By: stunnerz_84
1,984
Posted By stunnerz_84
Ill try this.. Thanks for your help!!
Ill try this..
Thanks for your help!!
1,984
Posted By stunnerz_84
Im working on Linux 2.6.18 and bash.
Im working on Linux 2.6.18 and bash.
1,984
Posted By stunnerz_84
Monitoring log for FATAL in last 15mins only
Hi all,
I need to develop the following script. Could anyone please provide me some inputs.

1) Monitor the system log file (sys.log) for any lines in the parameter file that will contain all the...
1,331
Posted By stunnerz_84
Hi Scrutinizer, Thanks for the response. I...
Hi Scrutinizer,
Thanks for the response.
I guess i cant use getopts in my case as i need to determine the options based on the input files provided. Please correct me if im wrong.

Thanks!!
1,331
Posted By stunnerz_84
Help needed with shell script
Hi,
I have trouble building the logic for the following, could anyone please help me out with this:

Im working on a wrapper script to check for input files (in a specific directory) and pass ...
59,996
Posted By stunnerz_84
Hi Guys, Sorry for the late reply...Thanks for...
Hi Guys,
Sorry for the late reply...Thanks for your effort!!

@agama, @corona...I did try adding -r option.

This is how i have my code now!!
func()
{
cd ${dir}
`find . -mtime +90 -type f...
59,996
Posted By stunnerz_84
Hey thank you so much for responding... ...
Hey thank you so much for responding...
@corona...It works fine if i dont use xargs...as it just prints the output...but as i said i want to zip these files and move them to a safe location.
If i...
59,996
Posted By stunnerz_84
cowardly refusing to create an empty archive
Hi,
I am trying to write an Archive script that should look for files older than x days, zip them and move the zip to the archive directory and delete the files that have been zipped. I am not sure...
1,034
Posted By stunnerz_84
Awesome!! It works...Thanks a lot!!!
Awesome!!
It works...Thanks a lot!!!
1,034
Posted By stunnerz_84
Hi, Thanks for replying. This is the script...
Hi,
Thanks for replying. This is the script which emails the disk usage report.

#!/bin/sh

#Writing to a file
exec > report.txt

#Check the amount of disk space
checksize=`df -h /test`
...
1,034
Posted By stunnerz_84
Help needed to split a line
Hi,
How can i split a line of string into two lines.

I would like to format the below string:
Filesystem 1M-blocks Used Available Use% Mounted on /abc/def/xyz 34567 2345 12345 90% /test

to
...
8,078
Posted By stunnerz_84
Thanks for replying... This is what i think...
Thanks for replying...

This is what i think the script does when i cut out the "while true" statement

Say if i have 3 new files available..then this script will process each file and then...
8,078
Posted By stunnerz_84
Help needed with File Watcher script
Hi all,
I am writing a script to do the following:
1) Check if there are any new <csv> files (in abc directory) to process
2) If there is new file, then perform some operation on that file.
3)...
2,736
Posted By stunnerz_84
This issue got resolved. Thanks a lot to each one...
This issue got resolved. Thanks a lot to each one of you for your help. Really appreciate!!
2,736
Posted By stunnerz_84
Thanks for the reply. This works absolutely...
Thanks for the reply. This works absolutely fine.But i have a question.
The input file sometime contains 3 fields,
Ex: TEST_3,20100221,20100220
Can this code handle 3 fields?

Also if the...
2,736
Posted By stunnerz_84
Automate the passing of parameters
I am writing a script that should read the csv file and pass the values in the file as parameters
to the script. The csv file looks like this:
TEST_1,20110221
TEST_2,20110220...
1,232
Posted By stunnerz_84
I am sorry to ask this but how/where should i use...
I am sorry to ask this but how/where should i use this in my code.

Thanks for responding!!
1,232
Posted By stunnerz_84
Help needed with Shell script
Hi all,
I need to modify the below highlighted piece to perform the below task. Please let me know as i am not able to figure out a way to do this.

[ "_${FILENAME%%%*}" = "_$FILENAME" ] ||...
2,801
Posted By stunnerz_84
Thanks for all the suggestions...!!
Thanks for all the suggestions...!!
2,801
Posted By stunnerz_84
May be yes...I can do it that way. This looks...
May be yes...I can do it that way. This looks like a better approach instead of grep'g multiple times...Thanks a lot !!
2,801
Posted By stunnerz_84
I did try doing it that way as well but it didnt...
I did try doing it that way as well but it didnt work..Anyway i really appreciate for taking time to reply..I somehow fixed the issue and here it is:
#!/bin/sh
err_code=0;
main_script.ksh <arg1>...
2,801
Posted By stunnerz_84
Help needed with error handling
I am writing a wrapper to one of the .ksh script. The wrapper script should capture the error/fatal(if any) and exit out of the script. Here is the script:

#!/bin/sh

. main_script.ksh <arg1>...
5,207
Posted By stunnerz_84
Pass parameter to the main script from wrapper script
Hi,
I am writing a wrapper script(wrap_script.sh) to one of the main scripts (main_script.sh)
The main script is executed as following:
./main_script.sh <LIST> <STARTDATE> <ENDDATE>
looks for a...
17,743
Posted By stunnerz_84
Thanks for the reply. Basically I am...
Thanks for the reply.

Basically I am passing the "csv" file as a parameter to the script.
Reading this file in the script like:
@lines=<>;
After this i am splitting the file at commas and...
17,743
Posted By stunnerz_84
"Use of uninitialized value" in perl
Hi Guys,
I am trying to run a Perl code which reads the csv file and has to write certain fields to another file .

I see the following when trying to execute the script

Use of uninitialized...
Showing results 1 to 25 of 36

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