10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I have written the below script to get the timestamp of each files and result is as below
Script
find /home/user -type f -name "*.json" -printf '%Tc %p\n' | awk {'print $1 " " $2 " " $3 " " $4 " " $5 " " $6 " " $7'}
Input
-rw-r--r-- 1 user domain users 17382 Jul 19 06:10... (5 Replies)
Discussion started by: nextStep
5 Replies
3. Shell Programming and Scripting
I am wondering if there is a script (if one exists, not confident in my own scripting ability) that is able to bring up specified information from the /var/log/messages. I need to show logged traffic on specific dates and times and protocols (ie. Show all insecure FTP traffic (most likely via... (13 Replies)
Discussion started by: vgplayer54
13 Replies
4. Shell Programming and Scripting
Hi.
In thread https://www.unix.com/shell-programming-and-scripting/267833-grouping-counting.html rovf and I had a mini-discussion on grep and awk.
Here is a demo script that compares the awk and grep approaches for this single problem:
#!/usr/bin/env bash
# @(#) s2 Demonstrate group... (1 Reply)
Discussion started by: drl
1 Replies
5. Shell Programming and Scripting
I've two files with data like below:
file1.txt:
AAA,Apples,123
BBB,Bananas,124
CCC,Carrot,125
file2.txt:
Store1|AAA|123|11
Store2|BBB|124|23
Store3|CCC|125|57
Store4|DDD|126|38
So,the field separator in file1.txt is a comma and in file2.txt,it is |
Now,the output should be... (2 Replies)
Discussion started by: asyed
2 Replies
6. Shell Programming and Scripting
Hi All,
Command: grep -i -n "rule" *.err *.log | grep -v "SP_RULE"
The above command when run gives me two -three lines of output.
Now I am storing the result of the grep command
ie,
ruleerrors=`grep -i -n "rule" *.err *.log | grep -v "SP_RULE"`
Now when I echo the value of ruleerrors, I... (6 Replies)
Discussion started by: Sreejith_VK
6 Replies
7. UNIX for Dummies Questions & Answers
Please help me store the content of Input file to many files.
Input file:
record
a
b
c
record
d
record
e
f
record
.....
Create file1:
a
b
c
Create file2: (1 Reply)
Discussion started by: buddyme
1 Replies
8. UNIX for Dummies Questions & Answers
How would I go about storing multiple file paths in a directory that begin like: 20080402*
and run a loop that reads each line of each file thats in a given directory. So far this is what I have:
#!/bin/ksh
echo "ENTER Reprint Date (YYYYMMDD): "
read ReprintDate
echo ""... (1 Reply)
Discussion started by: developncode
1 Replies
9. Shell Programming and Scripting
I have a script that converts a file into an html table. This script works fine for a 1 column table. However, I'm trying to do this for a multi-column table. My input file will look something like this:
a b c
d e f
g h i
My script basically works by taking in each line and putting that... (2 Replies)
Discussion started by: eltinator
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
How to store datas of the file into a string?
Thanks in advance.. (1 Reply)
Discussion started by: Fr0z3n999
1 Replies