10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a file name in the below format and have to append the date as _$currdate.
kchik_UK_lo.txt_$currdate.
The above should be the format and I dont want to put entire filename as above in the code, but it should give me the output as the above filename.Can anyone please help... (7 Replies)
Discussion started by: harika03
7 Replies
2. Shell Programming and Scripting
Daily stupid question. I want to increment the file name everytime the script is run. So for example if the filename is manager.log and I run the script, I want the next sequence to be manager.log1. So to be clear I only want it to increment when the script is executed. So
./script... (10 Replies)
Discussion started by: metallica1973
10 Replies
3. Shell Programming and Scripting
Hi all,
I want to generate output files in a loop, run the same command on the same input file 1000 times and output in files with a new name each time, maybe a number appended to it. The output will be different each time as I`m sampling randomly from the input file.
I want to do the... (3 Replies)
Discussion started by: newbie83
3 Replies
4. UNIX for Dummies Questions & Answers
Hello all,
i have tons of files in folder named like this (yyyymmdd):
bookcollection20100729
bookcollection20100730
bookcollection20100731
bookcollection20100801
bookcollection20100802
etc.
I need to find files with date range in there names lets say from 2010.07.30 - 2010.08.02
... (10 Replies)
Discussion started by: Whit3H0rse
10 Replies
5. Shell Programming and Scripting
Hi
I need to pull out the name of the file from the path.
See, here is my loop that gets the files:
dsxdir="/var/local/dsx/import"
for dsxfile in $dsxdir/*.dsx;
do
dsxlog $reverb --info --module="$module" "$dsxfile"
$dsximp $norule $oprange --dsn=$dsn --dbname=$dbname... (6 Replies)
Discussion started by: ladyAnne
6 Replies
6. Shell Programming and Scripting
I have filenames
filenameA_fg_MMDDYY.tar.gz
filenameASPQ_fg_MMDDYY.tar.gz
filenameAFTOPHYYINGH_fg_MMDDYY.tar.gz
filenameAGHYSW_fg_MMDDYY.tar.gz
Is there a way I can extract the date out of these filenames?
Thanks in advance (2 Replies)
Discussion started by: RubinPat
2 Replies
7. Shell Programming and Scripting
I'm trying to search all .odt files in a directory for a string in the text of the file.
I've found a bash script that works, except that it can't handle whitespace in the filenames.
#!/bin/bash
if ; then
echo "Usage: searchodt searchterm"
exit 1
fi
for file in $(ls *.odt); do
... (4 Replies)
Discussion started by: triplemaya
4 Replies
8. Shell Programming and Scripting
Hi I'm very new to this script thing, so please be gentle.
I am trying to get a command - the mach2qtl command in the code below - to loop through a set of files.
Each command should take the same two .dat and .ped files, but the .mlinfo and .mlprob files with filenames including 'chrom1' ... (7 Replies)
Discussion started by: polly_falconer
7 Replies
9. Shell Programming and Scripting
I need to extract the date part from the file name (20080221 in this ex) and compare it with the current date and delete it, if it is a past date.
$file = exp_ABCD4_T-2584780_upto_20080221.dmp.Z
really appreciate any help.
thanks
mkneni (4 Replies)
Discussion started by: MKNENI
4 Replies
10. Shell Programming and Scripting
hey guys. i'm new to shell scripting but not new to programming. i want to write a script that will take all the files in the current directory that end with a particular filetype and change all their names to a number in order. so, it would take all the jpg files and sort them in alphabetical... (30 Replies)
Discussion started by: visitorQ
30 Replies