Sponsored Content
Top Forums Shell Programming and Scripting What's UNIX Expert's suggestion for this thread ? Post 302781845 by Akshay Hegde on Sunday 17th of March 2013 11:17:17 PM
Old 03-18-2013
What's UNIX Expert's suggestion for this thread ?

Assume that 100 file's of type .txt are saved in directory
in which,
Code:
40 .txt files having ID 225 in column x
10 .txt files having ID 220 in column x
30 .txt files having ID 115 in column x
and remaining 20 .txt file's having UNIQUE ID say 226,227,228,229,230....

first I want to read only files with UNIQUE ID
like this
Code:
for file  in *.txt of UNIQUE ID; do
go_function_abc;
done

after this I want to read file's having ID 225
Code:
for file in *.txt of ID 225; do
execute_this_function_only_once; (this has to be executed only once I mean when $file==1,not 40 times)
go_to_function_xyz;(this has to be executed 1 to 39 times, that is filecount<no of files)
go_to_last_function(execute this function when filecount==No of files, thats 40==40)

Code:
then file's with ID 220,115...

Here for me, no problem in running file's with UNIQUE ID, if many file's are having same ID, then this is the only solution left to me

I hope UNIX Expert's will have solution for this.

Last edited by Akshay Hegde; 03-18-2013 at 01:15 AM..
 

8 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Suggestion for unix.com

I am relatively new here ...but I had a suggestion. The first time I visited this site I tried to go to unix.com and it did not go anywhere I then said ok let try www.unix.com. I think that it would be a good pratice to change the zone file file so that when you go to unix.com it comes here as... (5 Replies)
Discussion started by: gennaro
5 Replies

2. UNIX for Dummies Questions & Answers

Suggestion: Alternative OS for Windows - Totally Clueless on Unix/Linux OS

Can anyone tell me a good alternative to Windows? OS that can connect to a Windows domain and use for everyday (can use with Oracle). Easy to learn. (4 Replies)
Discussion started by: genesisX
4 Replies

3. Post Here to Contact Site Administrators and Moderators

Re: Suggestion to ease navigation .... thread

This post should be an edit of the post I just made to start the "Suggestion to ease navigation ..." thread, but my original post is not visible to edit, since it's waiting for moderator approval ... Additional text I wanted to add to my original post: The title of the The UNIX and Linux... (2 Replies)
Discussion started by: usnay12345
2 Replies

4. UNIX for Advanced & Expert Users

Suggestion Required for UNIX career

Hi, I am having experience on Perl and C# and worked as Windows Sytem Admin and now iam planning to become a UNIX developer. I am having knowledge on basic UNIX.. can any one suggest me any good material for c/c++ UNIX programming. on what all things a UNIX Programmer needs to... (1 Reply)
Discussion started by: chandrareddy1
1 Replies

5. UNIX for Dummies Questions & Answers

Need a suggestion on UNIX Books

Hi All, Request you to suggest any other book as of year 2013. The below thread is of year 2000 and I have not found the books mentioned in the link below. Which Unix Certification is the most needed these days? Or please share any updated thread is there on this. Thanks and regards,... (7 Replies)
Discussion started by: saps19
7 Replies

6. Post Here to Contact Site Administrators and Moderators

Didn't find a suggestion thread

An 'addition' to the "Homework & Classes" requirements.. As i am someone without paper, i just figured i got tempred reading such a question. To avoid such 'feelings' in future, i'd be thankfull if the 'kind & definition of the course' would be required too. As in (i dont know about proper... (2 Replies)
Discussion started by: sea
2 Replies

7. Cybersecurity

Looking for suggestion on authentication method for UNIX/Windows

Hello, We have mid level infrastructure of all on-premises servers. All windows servers are getting authenticated by Microsoft Active Directory Services, half Unix (Solaris+Linux) servers are getting authentication by NIS and other half by LDAP. We have plans to migrate from NIS to LDAP, so... (2 Replies)
Discussion started by: solaris_1977
2 Replies

8. What is on Your Mind?

Any Google SEO Expert to Help UNIX.COM?

I checked (again) and it seems like we lost 70% of our Google indexed links starting in March 2018. So far, I do not know what caused this drop: https://www.unix.com/members/1-albums215-picture904.png As mentioned, I have done a lot of checking, and we did not make any changes in March of... (2 Replies)
Discussion started by: Neo
2 Replies
RDUP-UP(1)							       rdup								RDUP-UP(1)

NAME
rdup-up - update a directory tree with a rdup archive SYNOPSIS
rdup-up [OPTION]... DIRECTORY DESCRIPTION
With rdup-up you can update an (possibly) existing directory structure with a rdup archive. The rdup archive has to be given to rdup-up's standard input. Username and uids rdup outputs both the username and uid, the receiving system (which may be a totally different system) checks if the username and uid match. If the username and uid don't match the (numeric) uid is used on the file. The same holds true for the groupname and gid. OPTIONS
-n Do a dry-run and do not create anything on disk. -t Create DIRECTORY (ala mkdir -p) if it does not exist. -s N Strip N path components from a pathname. If the resulting pathname is empty after this operation it is skipped. Be careful however with the following structure: /foo /foo/bar /foo/bar/bla.txt /foo/blork/bla.txt With rdup-up -s2 this will leave: <empty> <empty> /bla.txt /bla.txt And the last 'bla.txt' will overwrite the previous one, this will happen without warnings. -r PATH This option is related to the -s option, but works different. The string PATH is removed from (the beginning of) each pathname. With -r /home/backup the pathname /home/backup/bin/mycmd becomes /bin/mycmd. The same could be done with -s 2, but then you need to count the slashes. Note -s is always performed before -r. -v Be more verbose and echo the processed files to standard output. -vv Be even more verbose and echo processed file and the uid and gid information to standard output. -T Show a table of contents of the rdup stream received (ala tar -tf -). With -T the directory argument is optional. -T unsets any verbose (-v) options. -h A short help message. -V Show the version. EXIT CODE
rdup-up return a zero exit code on success, otherwise 1 is returned. AUTHOR
Written by Miek Gieben. REPORTING BUGS
Report bugs to <miek@miek.nl>. SEE ALSO
http:/www.miek.nl/projects/rdup/ is the main site of rdup. Also see rdup(1), rdup-tr(1) and rdup-backups(7). COPYRIGHT
Copyright (C) 2005-2010 Miek Gieben. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Licensed under the GPL version 3. See the file LICENSE in the source distribution of rdup. 1.1.11 13 Dec 2008 RDUP-UP(1)
All times are GMT -4. The time now is 07:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy