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
Hi
i have this script :
#!/bin/bash
DATE=$(date '+%Y-%m-%d %H:%M' -d "1 hour ago")
PASS=$(grep -A99999999999 '$DATE' /var/log/asterisk/full| grep -i 'Wrong password')
it a script that ment to go over log file a hour back from now until
the end of file.
right now im using... (5 Replies)
Discussion started by: batchenr
5 Replies
3. Shell Programming and Scripting
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
4. Shell Programming and Scripting
Hi guys,
I have to append the word count of a file at the end of the file name like this - > "filename_2345" where 2345 is the word count of "filename". How do i achieve this using one command ? I am not allowed to store the word count in a variable and then concatenate. Request your... (1 Reply)
Discussion started by: peter2312
1 Replies
5. Shell Programming and Scripting
I want to grep some information out of the dmidecode but when I type
dmidecode | grep Memory
I get several instances of the word. Is there a way I can just choose which instance I want to display? (8 Replies)
Discussion started by: jcnewton13
8 Replies
6. Shell Programming and Scripting
Hey guys,
I want move a specific word from the middle of the text and move it the end of the file, which means I want the word to be deleted from it's line and moved to the end of file.
I know how to use sed for adding a word the end of file, but I don't know how to move words.
tnx (2 Replies)
Discussion started by: Johanni
2 Replies
7. Shell Programming and Scripting
Hi folks,
Using shell, I am trying the append comma to every line of text.
the requirement is like, I have to open the txt file in unix and read line by line and should add comma at the end of every word to make it single line
txt file
-------
abc@gmail.com
bcd@gmail.com... (7 Replies)
Discussion started by: giridhar276
7 Replies
8. UNIX for Dummies Questions & Answers
Hi All
i need to delete a recurring word from point "n" till end of the file. there are other words in this file so i cannot use `dG`, can anyone help me out?
Kind regards
Brian (4 Replies)
Discussion started by: brian112
4 Replies
9. Shell Programming and Scripting
How do I match second word and then print that line to output
For eg: My file has following text and I want to check if second word is n then I want to print entire line .
xytxti8naclip y
xytxt32bpsimple y
xytxt32bpna n
xytxti16nae y
xysmps32bpp031_bst n... (7 Replies)
Discussion started by: pitagi
7 Replies
10. Shell Programming and Scripting
Hi
I want to read a flat file and add a word/value at the end of each line in the file and store the output in a temporary file. How can i do this? Plz help me with this.
Regards,
Saurabh (6 Replies)
Discussion started by: bhalotias
6 Replies