Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

find smaller values in file copy and delete

  Asked By: Sokol    Date: Oct 11    Category: Unix / Linux / Ubuntu    Views: 534


Question about Bash scripting in Ubuntu.

I am struggling here about the following, copying username to a new file and then deleting username in existing file only if older then 30 minutes (plain text file) but don't copy username to new file when same user is found with newer time stamp and delete the oldest time stamp of the corresponding user.

In a process i keep track the users login time in a file, login time is based on:

date +%s%N

The string within the file only is buildup as followed:
(no spaces in username)

date username@domain.com

Now i believe 'While Do' can do this trick, but i can't my way use 'If' in 'While Do'. Maybe another approach or 'While Do' is the approach?



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on find smaller values in file copy and delete Or get search suggestion and latest updates.