10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
is there a more efficient way to write the following code:
for eachlfile in $(ls -ltcrd ${BACKUPDIR}/${BACKUPNAME}*/content_${BACKUPNAME}* 2>/dev/null | awk '{print $NF}')
do
echo "=========================="
... (4 Replies)
Discussion started by: SkySmart
4 Replies
2. Shell Programming and Scripting
I have a list of files defined in a single file , one on each line.(No.of files may wary each time)
eg. content of ETL_LOOKUP.dat
/data/project/randomname
/data/project/ramname
/data/project/raname
/data/project/radomname
/data/project/raame
/data/project/andomname
size of these... (5 Replies)
Discussion started by: h0x0r21
5 Replies
3. Shell Programming and Scripting
Hello All,
Iam using below method to sort and compare files. First iam doing sorting and changing the same file and then doing comparing and taking the final result to another file.
sort -o temp.txt file1
mv temp.txt file1
sort -o temp.txt file2
mv temp.txt file2
sort -o temp.txt... (6 Replies)
Discussion started by: Vikram_Tanwar12
6 Replies
4. Shell Programming and Scripting
Hi All,
I have a file with the data:
Sun is Hot
Moon is cool
;
-- Mon Sep 10 08:54:10 CDT 2012
-- Mon Sep 11 08:54:10 CDT 2012
-- Mon Sep 12 08:54:10 CDT 2012
revoke connect from SREE;
delete from = 'SREE';
grant connect to SREE with 'fastcar8';
I want to remove the line above... (8 Replies)
Discussion started by: raosr020
8 Replies
5. Shell Programming and Scripting
HI All, I need to search for a particular pattern input by the user in order to delete the line. My username.txt has
username@email.com:John:149.0.3.4:1
username1@email.com:Harry:149.0.3.4:1
username1@email.net:Alex:149.0.3.4:1
username1@email.edu:Nemo:149.0.3.4:1
The program i written
... (3 Replies)
Discussion started by: ichar
3 Replies
6. Shell Programming and Scripting
I have a small script where I want to see if a file exists & then delete the first line from it.
I have code to help me find if the file exists, but I am unsure as to how to then take in the answer and remove the first line from the flatfile:
This is what I have so far just to output if the... (3 Replies)
Discussion started by: fatalxkiss
3 Replies
7. Shell Programming and Scripting
Hi,
I have research data, which is organized to 100 folders numbered 00-99. I have many sets of 100 folders, for different values of initial parameters. For some reason, the computer that ran the program to gather the data, didn't always create a unique seed for each folder. I anticipated that... (1 Reply)
Discussion started by: Jopi
1 Replies
8. Shell Programming and Scripting
Hi
When trying to find and delete files which are, say, 1 day, the find command misses a day. Please refer the following example.
xxxd$ find . -type f -ctime +1 -exec ls -ltr {} \;
total 64
-rw-rw-r-- 1 oracle xxxd 81 Apr 30 11:25 ./ful_cfg_tmp_20080429_7.dat
-rw-rw-r-- 1... (4 Replies)
Discussion started by: guruparan18
4 Replies
9. UNIX for Dummies Questions & Answers
I must really be bad at life today, because I couldn't even find a search option on the forums before asking for help, so I apologize if this is already listed somewhere.
I'm pretty new to UNIX, and basically only know enough to be dangerous. I have been appointed a task to basically go to a... (2 Replies)
Discussion started by: Puck
2 Replies
10. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies