11-16-2005
Need one more help- using sed
Hi Vino,
Once again thank you very much for your help. And as I am new to Sed, can you please explain the command that you have given to me or Also, can you please point me to some good sites where I can learn Sed?
It is working very well, but want to understand its working. I understood little only.
And here is one more problem I am facing, again I need your help:
Error: The directory /logDir/AR_archive/20051116135822 is not writeable
Error: The directory /test/logDir/AR_archive/20051116135822 is not writeable
I need to re-write as:
Error: The directory <AR_archive> is not writeable
I am trying the following:
sed -e 's#\(.*\)[AR_archive]/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\(.*\) #\1<AR_archive>\2#g'
But, it is giving:
Error: The directory /psg/gnanduri/Banksys/logDir/AR_archiv<AR_archive> is notwriteable.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I have some files which are creates every day using a script. I want to create a log files which does write "filename,creation day and time"
how can I do this ??
Alice (3 Replies)
Discussion started by: alisevA3
3 Replies
2. UNIX for Dummies Questions & Answers
I am trying to insert a line with a date stamp in a file that is used to monitor activity in one of our directories. By doing this, I want to grep that file each day and go to the last entry for each time a error occurred and pull all errors generated if any exist. If error exists I want that error... (3 Replies)
Discussion started by: shephardfamily
3 Replies
3. Shell Programming and Scripting
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
Discussion started by: ali hussain
5 Replies
4. Shell Programming and Scripting
Hi All,
Could anyone help me out in the below requirement:
I have a text(XML) file like this:
- <Dim2>
<Properties Name="" State="2" ShowHir="-1" ApplyFilter="-1" ExpandToLevel="1" BreakHierType="1" MaxDepth="1" SlicerSelectOptions="1" ShowLeaf="0" HasGroup="0" />
<Expanded... (1 Reply)
Discussion started by: vivekshady
1 Replies
5. Shell Programming and Scripting
I've seen several examples of grep showing the filename the string was found in, but what I really need is grep to show the file details in long format (like ls -l would).
scenario is:
grep mobile_number todays_files
This will show me the string I'm after & which files they turn up in, but... (2 Replies)
Discussion started by: woodstock
2 Replies
6. Shell Programming and Scripting
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies
7. Shell Programming and Scripting
Hi,
I am having a file name as exp_bkp_tables_18_Oct_2010_10_50_28.dmp which is used for import the records.
Now, I want to print the output using the selected file name as below :
Table records will get restored as on date 18-Oct-2010 and time 10:50:28
How it can be done ?
With... (5 Replies)
Discussion started by: milink
5 Replies
8. Shell Programming and Scripting
I want to filter out the date and time from this line in a file. How to do this using sed command.
on Tue Apr 19 00:48:29 2011 (12 Replies)
Discussion started by: vineet.dhingra
12 Replies
9. Shell Programming and Scripting
Hello,
Beginning with shell scipting, I'm trying to find in a csv file, the lines where the field related to hostname is displayed as an FQDN intead the hostname. (some lines are correct) and the to correct that inside the file:
Novell,11.0,UNIX Server,bscpsiws02,TxffnX1tX1HiDoyBerrzWA==... (2 Replies)
Discussion started by: Wonto
2 Replies
10. Shell Programming and Scripting
string="din&esh\nisgood"
File.txt:
the name is
sed "s#\#${string}#g" File.txt
Output am getting:
the name is dinesh
is good
Expected output:
the name is din&esh\nisgood
The input string is dynamic it will be keep on changing
am able to handle & by placing \& in the string.. (5 Replies)
Discussion started by: dineshaila
5 Replies
LEARN ABOUT REDHAT
tiffsetsubdirectory
TIFFSetDirectory(3T) TIFFSetDirectory(3T)
NAME
TIFFSetDirectory, TIFFSetSubDirectory - set the current directory for an open TIFF file
SYNOPSIS
#include <tiffio.h>
int TIFFSetDirectory(TIFF* tif, tdir_t dirnum)
int TIFFSetSubDirectory(TIFF* tif, uint32 diroff)
DESCRIPTION
TIFFSetDirectory changes the current directory and reads its contents with TIFFReadDirectory. The parameter dirnum specifies the sub-
file/directory as an integer number, with the first directory numbered zero.
TIFFSetSubDirectory acts like TIFFSetDirectory, except the directory is specified as a file offset instead of an index; this is required
for accessing subdirectories linked through a SubIFD tag.
RETURN VALUES
On successful return 1 is returned. Otherwise, 0 is returned if dirnum or diroff specifies a non-existent directory, or if an error was
encountered while reading the directory's contents.
DIAGNOSTICS
All error messages are directed to the TIFFError(3T) routine.
%s: Error fetching directory count. An error was encountered while reading the ``directory count'' field.
%s: Error fetching directory link. An error was encountered while reading the ``link value'' that points to the next directory in a file.
SEE ALSO
libtiff(3T), TIFFCurrentDirectory(3T), TIFFOpen(3T), TIFFReadDirectory(3T), TIFFWriteDirectory(3T)
October 15, 1995 TIFFSetDirectory(3T)