10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a log file which have a date and time at the start of every line.
I need to search the log file starting from a specific time to the end of file.
For example:
Starting point: July 29 2018 21:00:00
End point : end of file
My concern is what if the pattern of `July 29 2018 21:00:00`... (3 Replies)
Discussion started by: erin00
3 Replies
2. Shell Programming and Scripting
Hello, I have the following dataset
1
1
2
2
2
3
3
4
I want to keep just one instance of each number seen:
1
2
3
4 (3 Replies)
Discussion started by: Rabu
3 Replies
3. UNIX for Dummies Questions & Answers
Hi
How to see the first instance of an error in explorer log ?
In this case I want to know the first time error "SCSI transport failed" was populated in messages
Thanks
Amani (2 Replies)
Discussion started by: amani
2 Replies
4. Shell Programming and Scripting
Hi,
I have a log file (log.txt) that which contains lines of date/time.
I need to create a script to extract a CSV file (out.csv) that gets all the sequential times (with only 1 minute difference) together by stating the start time and end time of this period.
Sample log file (log.txt)
... (7 Replies)
Discussion started by: Mr.Zizo
7 Replies
5. Shell Programming and Scripting
Hi Ladies and Gents,
Explanation of my question with an example:
Let's consider the script: backup_every_hour.sh
#!/bin/bash
rsync -auv $dir $backup_dir >> backup_every_hour_script.log
Each time this script is called there will be a new entry at the end of the file... (1 Reply)
Discussion started by: freddie50
1 Replies
6. Shell Programming and Scripting
Hi
I'm trying to search for the last instance of the word 'cache' in a HTML file that I have downloaded from YouTube.
I'm using the following syntax, but an error is thrown when I try it.
grep -f "cache"
Also I wish to append the above grep command to the below so that the search for cache... (3 Replies)
Discussion started by: colmbell
3 Replies
7. Shell Programming and Scripting
Hi All,
I have a directory in which all log files will be generated. Apart from the log files, there are a few other files also generated. I want the names of all files which does not end with .LOG.
consider the dir has the following files
I want only ebaf02012009.ERR file.
Unix... (4 Replies)
Discussion started by: suresh_kb211
4 Replies
8. Shell Programming and Scripting
Hi,
I want to add \n as a EOF at the end of file if it does't exist in a single command. How to do this?
when I use command
echo "1\n" > a.txt
and
od -c a.txt
0000000 1 \n \n
0000003
How does it differentiate \n and eof in this case?
Regards,
Venkat (1 Reply)
Discussion started by: svenkatareddy
1 Replies
9. Shell Programming and Scripting
I have a big database log file which keepsgrowing daily. OS is HP UX. Here is a small part of it:
Tue Jan 27 04:03:22 2009
: add session begin for mfgeb on /dev/pts/th.
: Converting relative path to absolute path.
: add session end.
Tue Jan 27 04:03:29... (6 Replies)
Discussion started by: dinesh1178
6 Replies
10. Shell Programming and Scripting
Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Discussion started by: IronHorse7
3 Replies