10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am totally a newbie to any programming languages and I just started an entry level job in an IT company. One of my recent tasks is to create a script that is able to show the log file of linux service (i.e. ntpd service)
lets say, if I run my script ./test.sh, the output should be... (3 Replies)
Discussion started by: xiaogeji
3 Replies
2. Shell Programming and Scripting
Hi,
I have a problem with the spawn execution with expect.. i have done the code for expect in a separate file and i am calling the this execution from the bash script.. as given below..
-bash-4.1$ cat main.sh
#!/usr/bin/bash
./spawn.exp
==========================
-bash-4.1$ cat... (2 Replies)
Discussion started by: satishkumar432
2 Replies
3. Shell Programming and Scripting
Hello,
Ubuntu server 11.10
can anybody help what is problem with my shell script?
#!/bin/bash
#script to find out currently logged on user is root or not.
if ]
then
echo "You are super"
else
echo "You are awesome!"
fi
When I run script, I get following output
./uid: line 3:
I... (4 Replies)
Discussion started by: kaustubh
4 Replies
4. Programming
Hi folks,
I would like to get familiar with shell script programing.
The first task is:
write a shell script that:
scans your home-folder + sub-directory for all txt-files that all users of your group are allowed to read and write
then output these files sorted by date of last... (4 Replies)
Discussion started by: rollinator
4 Replies
5. Shell Programming and Scripting
Hi,
I am trying to automate the killing of named processes of which I found a good solution here on the forums but as I am pretty much a begginer to linux I am having an issue. The code I found is:
kill $(ps -ef | nawk '/monitoreo start/ { print $2}'}
but what I want to do is replace... (3 Replies)
Discussion started by: TylrRssl1
3 Replies
6. Shell Programming and Scripting
Can someone help me write this shell script?
I am completely new to shell and as a fun task my uncle has challenged me a problem (out of all other people). Basically, all he wants me to do is to create backup file in a folder that is named “disables.”
This is what he said: create a shell script... (0 Replies)
Discussion started by: hotcutiepie05
0 Replies
7. Shell Programming and Scripting
My problem looks like it should have a simple solution but it seems that after many days of research I cannot find a good solution. What I have is an input file that contains lines of information. What I need is to extract specific information from that file. What I know is that somewhere in the... (2 Replies)
Discussion started by: eback
2 Replies
8. Shell Programming and Scripting
Q1>How do i read and write to file in shell script. Here is what i want let's assume the filename as "file1"
Read file1
Check the content of file1 which can be either "0" or "1"
if(content == 0)
{
execute a command
}
flush file1(remove all contents in it)
write "1" in to... (5 Replies)
Discussion started by: perk_bud
5 Replies
9. Shell Programming and Scripting
Basically I have a shell script and i want to search the computer for a folder and if that folder exists i want to take some action. Not sure exactly how to do this most efficiently.
Not very experienced....any help would be appreciated. (1 Reply)
Discussion started by: meskue
1 Replies
10. Shell Programming and Scripting
I'm sure this is an easy one but I can't seem to get it working. Given the following:
for oldName in `ls *.JPG` ;do
newName=<confusion here. how to make sed perform 's/.JPG/_thumb.JPG/g' operation on $oldName>
done
Could someone show me what I'm doing wrong?
Thanks
Ken (1 Reply)
Discussion started by: ktoz
1 Replies
TIFFWriteDirectory(3tiff) TIFFWriteDirectory(3tiff)
NAME
TIFFWriteDirectory - write the current directory in an open TIFF file
SYNOPSIS
#include <tiffio.h>
int TIFFWriteDirectory(TIFF* tif)
Write the contents of the current directory to the file and set up to create a new subfile in the same file. Applications only need to call
TIFFWriteDirectory when writing multiple subfiles to a single TIFF file. TIFFWriteDirectory is automatically called by TIFFClose and TIFF-
Flush to write a modified directory if the file is open for writing.
Diagnostics
All error messages are directed to the TIFFError(3tiff) routine.
Error post-encoding befoBeforeecwritingitthe contents of the current directory, any pending data is flushed. This message indicates that an
error occurred while doing this.
Error flushing data befoBeforeewritingrthe.contents of the current directory, any pending data is flushed. This message indicates that an
error occurred while doing this.
Cannot write directory, Therefwasanot enough space to allocate a temporary area for the directory that was to be written.
Error writing directory Aowrite error occurred when writing the count of fields in the directory.
Error writing directory Aowriteserror occurred when writing the directory fields.
Error writing directory Aiwrite error occurred when writing the link to the next directory.
Error writing data for fAewriteserror occurred when writing indirect data for the specified field.
Error writing TIFF headeA.write error occurred when rewriting header at the front of the file.
Error fetching directoryAcread.error occurred when fetching the directory count field for a previous directory. This can occur when setting
up a link to the directory that is being written.
Error fetching directoryAlread error occurred when fetching the directory link field for a previous directory. This can occur when setting
up a link to the directory that is being written.
1 is returned when the contents are successfully written to the file. Otherwise, 0 is returned if an error was encountered when writing
the directory contents.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWTiff |
+-----------------------------+-----------------------------+
|Interface stability |Uncommitted |
+-----------------------------+-----------------------------+
libtiff(3), TIFFError(3tiff), TIFFOpen(3tiff), TIFFReadDirectory(3tiff), TIFFSetDirectory(3tiff)
This man page was originally written by Sam Leffler. Updated by Breda McColgan, Sun Microsystems Inc., 2004.
05 Apr 2004 TIFFWriteDirectory(3tiff)