10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
2. UNIX for Dummies Questions & Answers
Hi
Here is my script that calls my awk script
#!/bin/bash
set -x
dir="/var/local/dsx/csv"
testfile="$testfile"
while getopts " f: " option
do
case $option in
f ) testfile="$OPTARG";;
esac;
done
./scriptFile --testfile=$testfile >> $dir/$testfile.csv
It calls my awk... (1 Reply)
Discussion started by: ladyAnne
1 Replies
3. Shell Programming and Scripting
I would like to find whether a file exists in the UNIX machine. That i can check using
if ;then
echo "exists"
echo " `cat $file` "
else
echo "invalid file"
fi.
and i can find out using :
find / -name "filename" . But it i have wanted to search in all directories. How to get... (3 Replies)
Discussion started by: rparsa001
3 Replies
4. Shell Programming and Scripting
can anyone help me in writing script in UNIX for copying files in two server from the third server after checking the files in the third server and if there is anything new in the third server automatically it should be added to the rest of the two servers and if same file is existing in the two... (4 Replies)
Discussion started by: REKHA09
4 Replies
5. Shell Programming and Scripting
Hi,
I am new to scripting, so any help on this would be much appreciated.
I am trying to rename a bunch of files, taking the names sequentially from a list read in another file...
# ls oldnames
file_1
file_2
file_3
# cat names
red
yellow
green
I want the files to take on the... (6 Replies)
Discussion started by: starsky
6 Replies
6. Shell Programming and Scripting
I need to get files names passed to a script. Here number of files passed may vary
like MyScript.ksh file1 file2 file3..... so on
I am writting script somthing like this
set -A Files
while (i<=$#)
do
File=$i
let i=i+1
done
Is this correct way doing this. Is there any other way.... (5 Replies)
Discussion started by: unishiva
5 Replies
7. Shell Programming and Scripting
I'm getting the following errors when I try to write a script to unzip some zip files. When I use the free trial copy of the commerical winzip program, however, they work fine. When I use -l or -t on unzip it indicates no errors. When I use the -o switch interactively from the bash command line it... (1 Reply)
Discussion started by: siegfried
1 Replies
8. UNIX for Dummies Questions & Answers
thanks guys i managed to answer (0 Replies)
Discussion started by: bebop1111116
0 Replies
9. Shell Programming and Scripting
I am new to shell scripting and would appreciate any help I can get.
I need to write a Unix shell script that I will run whenever I have a tar file to uncompress(Korn shell). Please put in mind that I have different environements that I will run it on.
Thanks in advance ;) (4 Replies)
Discussion started by: nkem22
4 Replies
10. Shell Programming and Scripting
I have a problem with syntax methinks, when it comes to sed.
This is my script for a user to type sed commands:-
yes=y
function writefunction
{
$tool $command $newfilename $filename
}
echo
echo
echo "1. Type the name of the tool you are using i.e sed."
read tool
echo... (3 Replies)
Discussion started by: Trufla
3 Replies