10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am writing the shell script in ksh to check certain no of files exists,In my case there are 7 files exist like below
Sales1_timstamp.csv
Sales2_timstamp.csv
Sales3_timstamp.csv
Sales4_timstamp.csv
Sales5_timstamp.csv
Sales7_timstamp.csv
Sales7_timstamp.csv
Once all the files... (4 Replies)
Discussion started by: SRPR
4 Replies
2. Shell Programming and Scripting
Hi all,
One of my script crated created 2 files in a dirs Output.log and Output.tmp. Now in another script i need to check if both of the above mentioned files are present in a directory or not.
I know to check one file but need to check both the files.
Anyone could please tell me how... (3 Replies)
Discussion started by: girijajoshi
3 Replies
3. UNIX for Dummies Questions & Answers
I have many files that can have various amounts of rows. I essentially want to output each row into a new file if a pattern is matched between two files.
I have some code that does something similar but I want it to output every single input row from every file into a separate output file; that... (5 Replies)
Discussion started by: verse123
5 Replies
4. UNIX for Dummies Questions & Answers
Hi friends,
I am trying to check if the two files i am expecting are created in a specific location.
if both files does not exist, do an echo
if -a ]; then
echo "files not found"
fi
It gives me the following message:
bash: Please help! :) (3 Replies)
Discussion started by: kokoro
3 Replies
5. Shell Programming and Scripting
i writing a program that checks if any .txt files exist in the current directory if it does, then it lists the files...
i have got everything right, except the validation part doesnt work!
....
if
then
ls *.txt
else
echo "file not found"
everytime it tells me file not found!!
by... (3 Replies)
Discussion started by: bshell_1214
3 Replies
6. Shell Programming and Scripting
Hello all,
Would like to know how to find records between two files which are not exists in one another in one. For example: I've two files "fileA" and "fileB" and want to find record from "fileB" which does not exists in "fileA".
fileA
--------
ABCD
DEFG
GHIJ
KLMN
NOPQ
RSTU
VUWX... (5 Replies)
Discussion started by: nvkuriseti
5 Replies
7. Shell Programming and Scripting
Hi,
I would like to see the file list which contains the data.
Ex : - When I enter the "ls -ltr" command it will show all the files which are exists in the directory, But I want only those files list which are non zero byte by using only ls command.
I knew that I can write a script with... (12 Replies)
Discussion started by: kandi.reddy
12 Replies
8. Shell Programming and Scripting
Hi everyone. I am trying to write a bash script that will copy files from one directory to another but I need to be able to check the directory that I'm copying the files to and see if the file already exists. If it does I need to add a number at the end of the copied file. Thanks for your help. (3 Replies)
Discussion started by: snag49ers
3 Replies
9. Shell Programming and Scripting
Hi friends..
I hav a problem....
I dont know how to check .c files exists r not in a folder using IF in C shell script
actually i tried like this
if(=~ *.c)
even though some .c files or there in the current folder..it is not entering int o the if control statement...... (17 Replies)
Discussion started by: p.hemadrireddy
17 Replies
10. UNIX for Dummies Questions & Answers
I've got a script with this snippet:
if
then
I know that the -s indicates that the file exists and is not empty. How can I specify that the file exists, but is empty? I thought I could do:
if ]
then
But this generates a "else unmatched" error on the else that follows. (5 Replies)
Discussion started by: dstinsman
5 Replies