Search Results

Search: Posts Made By: jimbojames
920
Posted By jimbojames
Thank you Don, that is a great help!
Thank you Don, that is a great help!
920
Posted By jimbojames
Assistance required with awk and regular expressions
Hello there,

I am trying to get my head around the section below of a script we use that incorporates AWK and Regular Expressions.

{ match($0,"The broker[^.][^.]*[.]");print $1,$2,$3 ":",...
4,439
Posted By jimbojames
Thanks for your help hergp, that is exactly what...
Thanks for your help hergp, that is exactly what I needed.
4,439
Posted By jimbojames
scp files from subdirectories only.
Hi there,

Our current directory structure is set up as follows:
-2013-09-20
- 380134664407418202
- 76523.html
- 5331257754517660
- 76267.html
- 76268.html
- 76269.html ...
3,568
Posted By jimbojames
Sorry Agama, I guess it would make things easier!...
Sorry Agama, I guess it would make things easier!

Yes, the logs are date/timestamped, here is an example:
3,568
Posted By jimbojames
Scan logs for errors in the last hour only.
Hi there.

Is there a way to scan a specific log file for errors that occurred in the last hour (time when script is run - 60 minutes)?

I have a script that will change to a directory where the...
1,432
Posted By jimbojames
Calling a variable from a variable.
Hi everyone,

Is it possible to set a variable that calls another variable?

I.E.
SCRIPT=MY_SCRIPT.ksh ${VAR5}

${VAR5} is set earlier in the script, and I want to be able to call this when...
3,095
Posted By jimbojames
Thanks Guys, that has helped a lot!
Thanks Guys, that has helped a lot!
3,095
Posted By jimbojames
awk for a string in a filename
Hi there

I have the variable command below in a script to list the file name in a directory:FILEN="$(ls <PATH> | awk '{print $1}')".
When it is run, it correctly returns the following:. I would...
7,592
Posted By jimbojames
Thanks Guys, I appreciate the help.
Thanks Guys, I appreciate the help.
7,592
Posted By jimbojames
Redirect Standard Error to /dev/null is not working.
Hello.

When I run a .ksh that contains the command below, and there is no file available in the source location the "FILE_NAME_*.CSV not found" error is still being displayed.

FILEN=$(ssh...
13,285
Posted By jimbojames
Thanks bipinajith, that is perfect!
Thanks bipinajith, that is perfect!
13,285
Posted By jimbojames
Thanks jim mcnamara, that is great. Do you know...
Thanks jim mcnamara, that is great. Do you know if it can be enhanced so that only the directories/files that the executing user id has access to are returned? ie, if a error is returned, it won't...
13,285
Posted By jimbojames
Recursive Find on file size
Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only?

Thanks in advance.
1,005
Posted By jimbojames
Thank you bipinajith, that will help a lot!
Thank you bipinajith, that will help a lot!
1,005
Posted By jimbojames
If statement explanation
Could anyone please advise what the in the following if statement means?

if [ ! -z "${RN_FILES}" ] ; then

Thank you.
8,065
Posted By jimbojames
Thank you Chubler_XL, that works perfectly!
Thank you Chubler_XL, that works perfectly!
8,065
Posted By jimbojames
Thanks Chubler_XL. Unfortunately mktemp does...
Thanks Chubler_XL.

Unfortunately mktemp does not work and teh following error is returned

I have modified your suggestion to the following DIR=transfer/move/sys/mail/20130123/
FILES=$(ls...
8,065
Posted By jimbojames
Moving and renaming multiple files in a directory
Hi.

I am trying to automate the movement and renaming of a number of files in a directory. I am using the 'mv' command as I do not have access to 'rename'. I have the following scripted FILES=$(ls...
4,560
Posted By jimbojames
Thank you Don & Scrutinizer, it's has been very...
Thank you Don & Scrutinizer, it's has been very valuable. Is there a way to do the above but base the surviving file on the created date, not alphabetically?
4,560
Posted By jimbojames
Hi Don, The output from running ls...
Hi Don,

The output from running ls ${DEST_LOCATION}/${FILES} | tee /tmp/pipe1 | sort -r -k 4,4n | tee /tmp/pipe2 | head -1 is .

The contents of pipe1 are:
...
4,560
Posted By jimbojames
Thanks Guys, you help and explanations have been...
Thanks Guys, you help and explanations have been fantastic.
4,560
Posted By jimbojames
Hi Don, Sorry for the confusion, this is...
Hi Don,

Sorry for the confusion, this is part of a script that was created by someone who no longer works here, and I was trying to use part of the functionality in a new script that I was...
4,560
Posted By jimbojames
Explanation of the sort command
Hi everyone,

I am wondering if someone could please break down and explain the following sort command for me:

ls ${DEST_LOCATION}/${FILES} | sort -rt -k 4,4n | head -1

I have tried working...
55,862
Posted By jimbojames
Thanks everyone, that has helped me a lot!
Thanks everyone, that has helped me a lot!
Showing results 1 to 25 of 47

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