10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a shell script like the one below but cannot get it working:
#!/bin/bash
#$ -cwd
CHR=$2
# directories
ROOT_DIR=./
RESULTS_DIR=${ROOT_DIR}results/
# executable
SHAPEIT_EXEC=${ROOT_DIR}shapeit.v2.r727.linux.x64/shapeit.v2.r727.linux.x64
# parameters
THREAT=5... (1 Reply)
Discussion started by: wmelroy
1 Replies
2. Shell Programming and Scripting
I have a directory that contains several files, out of which some files are have an extra extension for example
file1.new.new.new
file2.new.new.new
file3.new.new.new
file4.new.new.new
i want to write a shell script that rename all such file with only single extension like
file1.new... (7 Replies)
Discussion started by: mukulverma2408
7 Replies
3. Shell Programming and Scripting
so I've made a shell script that downloads 6 files in succession from a given url, then deletes them. Now I want to time the script, and the average time it uses by running it ~100 times. My problem is tho, how do I store the time it takes for each run through of the script? I know time writes to... (3 Replies)
Discussion started by: navlelo
3 Replies
4. Red Hat
Hell Guys,
Being a newbie, I need some help in finding a certain string from a log file of thousands of lines (around 30K lines) and have the output in a separate file.
Below is the file output -
10.155.65.5 - - "POST... (15 Replies)
Discussion started by: rockf1bull
15 Replies
5. Shell Programming and Scripting
Hi.,
How to extract the extension of a file which are present in the directory?. In my script I tried something like:
echo abc_ss_222_54.txt | awk -F"" '{print $5}'
But I din't got .txt echoed in console. Pl. suggest a solution for this.
And also, for finding a specific... (1 Reply)
Discussion started by: IND123
1 Replies
6. UNIX for Dummies Questions & Answers
I searched the forum, but there was different type of rename.
Hello.
I have files in folder.
Like:
xxxxxxxx1.html
or
xxxxxxxx2.txt
or
xxxxxxxx3.tar.gz
and how to rename or change file extension case to
xxxxxxxx1.htm
or
xxxxxxx2.TXT
or (5 Replies)
Discussion started by: Sheldon
5 Replies
7. Shell Programming and Scripting
Hi All
I have a csh shell script which should check if a given file is a zip file as below:
****************************************
#!/bin/csh -f
if ]; then
echo is a zip file
else
echo sorry not a zip file
endif
exit
****************************************
... (1 Reply)
Discussion started by: raj144
1 Replies
8. Shell Programming and Scripting
Hey,
I'm having a problem finding out if a directory holds any files with a certain file extension, for example .txt.
I have tried: if (! -e "*.txt")
and I've tried: set FILES=`ls *`
echo "Found $FILES"
foreach FILE ($FILES)
if($FILE == "*.txt")
And neither of... (2 Replies)
Discussion started by: amnesiaiom
2 Replies
9. Shell Programming and Scripting
hey,
im looking for a way of extending a string in shell script.
for example i have two strings "." and "abcd",
i need to extend the first string so that it is the same length as the second.
so "." and "abcd" becomes "...." and "abcd",
could someone shed light on how to do this ? thanks (4 Replies)
Discussion started by: vbm
4 Replies
10. UNIX for Dummies Questions & Answers
Rather new to unix, so please don't beat me!
I'm trying to get a list of files into a variable that I can use throughout the rest of the script. The challenge is that I need to exclude a certain extension from the list, and I'm having trouble with it. For example:
item_a
item_a.exe... (3 Replies)
Discussion started by: Loriel
3 Replies