I am working with a list that contains a large number of files listed by their absolute path. I am trying to determine a way to delete the file name at the end of each line, therefore leaving just the directory path. For example, I'd like to go from:
to
I remember that there is a simply command that accomplishes this, but I can't remember what it is for the life of me. Thanks for any assistance that can be provided.
-Omni
Last edited by Franklin52; 09-20-2012 at 04:44 AM..
Reason: Please use code tags for data and code samples
I have a text file with rows of information (it is basically a ls command information(o/p from ls command))
I need to remove the lines ending with a .cnt extension and keep the lines ending with .zip extension, how to accomplish this.
I also only need the date,size and name of the file from every... (2 Replies)
Hi, I have multiple large files which consist of the below format:
I am trying to write an awk or sed script to remove all occurrences of the 00 record except the first and remove all of the 80 records except the last one.
Any help would be greatly appreciated. (10 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Hi,
I have numerous files which have data in the following format
A|B|123.|Mr.|45.66|33|zz
L|16.|33.45|AC.|45.
I want to remove decimal point only if it is last character in a number.
O/p should be
A|B|123|Mr.|45.66|33|zz
L|16|33.45|AC.|45
I tried this
sed -e 's/.|/|/g'
Problem... (6 Replies)
Hi all,
Is there other way to Add text at start and ending of every line?
here my script:
cat file.txt |awk '{print "<p align=\"justify\">"$0"</p>"}'
but the problem they put including white spaces, I only need those line have a sentence or text not an skip all have empty string or have... (7 Replies)
Hello,
Here is my text data excerpted from the webpage:
input
My target is to get:
What i tried is:
sed 's/.*\(connector\)/1/' input > output
but all characters coming before the word "connector" are deleted which is not good for me.
My question: (9 Replies)
Hello experts,
I have a text file with lot of curly brackets (both opening { & closing } ). I need to delete them alongwith the text between opening & closing brackets' pair.
For ex: Input:-
59. Rh1 Qe4 {(Qf5-e4 Qd8-g8+ Kg6-f5
Qg8-h7+ Kf5-e5 Qh7-e7+ Ke5-f5 Qe7-d7+ Qe4-e6 Qd7-h7+ Qe6-g6... (6 Replies)
I have a file of a content like this:
abc_bla -def 800
abc_bla -def 802
abc_bla -def 804
abc_bla -def 806
abc_bla -def 808
abc_bla -def 810
abc_bla -def 812
abc_bla -def 814
...
abc_bla -def 898
abc_bla -def 900
abc_bla -def 902
abc_bla -def 904
...
abc_bla -def 990
abc_bla -def... (7 Replies)
Discussion started by: maya3
7 Replies
LEARN ABOUT OPENSOLARIS
grablogs.conf
grablogs.conf(4) File Formats grablogs.conf(4)NAME
grablogs.conf - grablogs configuration for libgrablogs.so of the plugins of
gnome-system-log file
SYNOPSIS
/usr/lib/gnome-system-log/plugins/grablogs.conf
DESCRIPTION
The libgrablogs.so is a plugin for gnome-system-log(1), it colloct the log files from the system as many as possible. grablogs.conf is a
configuration file that contains a set of lines mixed with sh(1) syntax codes and individual
log files. libgrablogs.so will read the file try to get a log files list for
gnome-system-log(1). Users can copy the file into $HOME/.gnome2/gnome-system-log/plugins/`uname -p` to overwrite the system default one.
The grablogs.conf file contains the following configuration categories:
[configs]
Each line under this category is interpreted as a config file of System. The plugin will open the config file and try to find
all system paths of the logs.
[commands]
Each line under this category is interpreted as a shell command and will be execute through a pipe. And each line of the out-
put of the command will be interpreted as a log path.
[logs] Each line under this category is interpreted as a log path.
FILES
/usr/lib/gnome-system-log/plugins/grablogs.conf
The system default configuration file for the plugin libgrablogs.so
$HOME/.gnome2/gnome-system-log/plugins/`uname -p`/grablogs.conf
The user specific configuration file for the plugin libgrablogs.so
EMAMPLE
[configs]
/etc/syslog.conf
[commands]
for i in `svcs -aH -o FMRI | grep -v lrc `; do svcprop -p restarter/logfile $i 2>/dev/null || svcprop -q-p restarter/alt_logfile $i
2>/dev/null ; done
[logs]
/var/log/messages
/var/log/secure
/var/log/maillog
/var/log/cron
/var/log/Xorg.0.log
/var/log/XFree86.0.log
/var/log/auth.log
/var/log/cups/error_log
SEE ALSO gnome-system-log(1), pipelog.conf(1)gnome-utils 2.16.0 13 Oct 2006 grablogs.conf(4)