Search Results

Search: Posts Made By: swasid
3,670
Posted By swasid
Thank you both. Is there a way I can exclude the...
Thank you both. Is there a way I can exclude the files with both the date and timestamp? I mean only the below files need to be retained:

sample-test~1.lg.
sample-test~1.lg.
...
3,670
Posted By swasid
Thank you Don Cragun and Aia for your reply....
Thank you Don Cragun and Aia for your reply. That's exactly what I was looking for.

@Don Cragun - My actual file list looks like this:

sample-test~1.lg.15-05-25_20:41:05.20150611
...
3,670
Posted By swasid
Excluding files with timestamp from ls
Hi,

I have a list of files all starting with aa but some of them also have a timestamp suffixed which I want to remove from my search. For e.g.

aa1
aa2
aa.15-05-25_20:41:05.20150611...
2,492
Posted By swasid
Using prune with find
Hi,

I have two files under two separate directories as in:

find . -name test.sh

./test.sh
./abc/test.sh

I want my find to only look for the file test.sh that is under the current...
1,854
Posted By swasid
Thanks sea. It's working. Just to know, is there...
Thanks sea. It's working. Just to know, is there any way my first approach can be refactored? The problem is that when I echo $FILE_NAME, it's listing all the files that are read as the second...
1,854
Posted By swasid
Trying out a simpler version this time with: ...
Trying out a simpler version this time with:

#!/bin/ksh

SOURCE_DIR="/abc/src"
DEST_DIR="/abc/src/dest"

cd $SOURCE_DIR

for FILENAME in xxx yyy zzz
do
...
1,854
Posted By swasid
The main problem is that the files present aren't...
The main problem is that the files present aren't getting moved to the destination folder. Is there a simpler way of achieving the same?
1,854
Posted By swasid
Problem in compressing and moving files
Hi

I am writing a sample script (sample.ksh) to compress files in the source directory and move them to another directory.
The script takes a config file (files.config) as the paramter the...
1,159
Posted By swasid
I tried both the options but am getting ...
I tried both the options but am getting

ksh[3]: ATT1: bad number

The name of each file should get suffixed to the variable being used i.e. size_ATT1 and the echo should return the value stored...
1,159
Posted By swasid
Variable values within for loop
Hi All

I am trying to fetch the size of three files into three separate variables within a for loop and am doing something like this:

for i in ATT1 ATT2 ATT3
do
size_$i=`ls -ltr $i | awk...
1,784
Posted By swasid
CSV File Creation Within Shell Script
Hi All,

I am trying to create a CSV file within a shell script test.ksh and the code snippet is something like below:

#!/usr/bin/ksh

# Set required variables.
. $HOME/.prof

# Output file...
1,715
Posted By swasid
Am running this on AIX 5
Am running this on AIX 5
1,715
Posted By swasid
Function throwing an error
Hi All

I have two shell scripts where the second is getting invoked from the first. E.g.

test1.sh and test2.sh Within test1, the code is something like this:

#!/bin/bash

. test2.sh
...
4,091
Posted By swasid
I am using Korn Shell and running this on AIX...
I am using Korn Shell and running this on AIX 5.3. The files are under /temp (created for the purpose of testing) itself
4,091
Posted By swasid
Here is the output from ls /temp/sample_*|od -cb ...
Here is the output from ls /temp/sample_*|od -cb


0000000 / t e m p / s a m p l e _ a a _ t
057 164 145 155 160 057 163 141 155 160 154 145 137 141...
4,091
Posted By swasid
Here it is: -rw-r--r-- 1 prd tadmin ...
Here it is:

-rw-r--r-- 1 prd tadmin 17 May 27 08:12 /temp/sample_aa_test
-rw-r--r-- 1 prd tadmin 17 May 27 08:12 /temp/sample_bb_test
-rw-r--r-- 1 prd tadmin ...
4,091
Posted By swasid
I am in the right directory and the files are...
I am in the right directory and the files are indeed present there. But when I run, I get the message below:

sample_aa_test is not present
sample_bb_test is not present
sample_cc_test is not...
4,091
Posted By swasid
@Don, The value of fcnt is getting reset to...
@Don,

The value of fcnt is getting reset to 0 immediately after the for loop

cd /temp # This was actually /tmp
fcnt=0
for i in aa bb cc dd
do if [ -e "sample_${i}_test" ]
...
4,091
Posted By swasid
Thank you both for your help. It worked with some...
Thank you both for your help. It worked with some minor tweaking to @SriniShoo's code
4,091
Posted By swasid
Getting file count in a variable
Hi All

I am checking for the presence of certain no of files in a directory. Only if the required no of files are present should I continue with my processing.

For e.g. in the temp directory...
3,990
Posted By swasid
@Srini, Copying the files to the remote...
@Srini,

Copying the files to the remote server from local is working with the option you had suggested but once on the server, am not able to move the files from one location to another. The code...
3,990
Posted By swasid
Thanks a lot @SriniShoo. It's copying the...
Thanks a lot @SriniShoo. It's copying the required files to the destination folder now. :)

---------- Post updated at 05:19 AM ---------- Previous update was at 03:41 AM ----------

I just...
3,990
Posted By swasid
@clx, Did this complete on the system you tested...
@clx, Did this complete on the system you tested because it's running indefinitely on mine?
3,990
Posted By swasid
I don't have any option other that ksh i'm afraid
I don't have any option other that ksh i'm afraid
3,990
Posted By swasid
AIX sadly doesn't support either the -regex or...
AIX sadly doesn't support either the -regex or -regexttype option :(
Showing results 1 to 25 of 70

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