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. UNIX for Beginners Questions & Answers
Hi ,
Please help me out for the below problem -
I have 2 files in a directory -
$ ls -ltr
total 4
-rwx------+ 1 abc Domain Users 615 May 31 17:33 abc.txt
-rwx------+ 1 abc Domain Users 0 May 31 17:33 ll.sh
I want to write the filename of abc.txt along with the directory to the... (2 Replies)
Discussion started by: Pratik4891
2 Replies
3. Shell Programming and Scripting
Trying to process 1000 or so files. Take original date and append to end of file. Like so:
tstpls42.bas
tstpls42.bas.Sep-11--2011
Been working along these lines:
date=`ll tstpls42.bas |cut -c 46-57 |sed -e 's/]/\-/g' | grep -v '^$'`
for i in *.bas ; do j=`ll $i /hpdump/b1 | awk... (1 Reply)
Discussion started by: joeadmin
1 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
I was thinking something like
for i in `find . -name "*.log.Z"`; do mv $i name.log.Z
or something like that? (3 Replies)
Discussion started by: xgringo
3 Replies
6. Shell Programming and Scripting
Hi,
I have a files in a directory as below :-
ls -1
mqdepth-S1STC02
proc-mq-S1STC01
proc-mq-S1STC02
proc-mq-S1STC03
Whereever i have S1STC i need to copy them into new file with file name S2STC.
expected output :-
ls -1
mqdepth-S2STC02
proc-mq-S2STC01
proc-mq-S2STC02... (3 Replies)
Discussion started by: satishmallidi
3 Replies
7. UNIX for Dummies Questions & Answers
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 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
Hello I am trying to append an incrimenting number to the end of each line I have it working with a temp file. But I want to do this without a temp file.
a=1
cat "file" | while read LINE
do
echo "$LINE, $a" >> filewithnumbers
a=`expr $a + 1`
... (4 Replies)
Discussion started by: rorey_breaker
4 Replies
10. Shell Programming and Scripting
Hi All,
I have two comma separated value(CSV) files, say FileA and FileB.
The contents looks like that shown below.
FileA
EmpNo,Name,Age,Sex,
1000,ABC,23,M,
1001,DES,24,F, ... (2 Replies)
Discussion started by: ultimate
2 Replies