9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Linux Redhat, BASH Shell.
I want to put this in my .bash_profile
I have log files that go to directory paths based in part on other variables such as went DB Name is set in memory. So if the DB Name changes the path to the log file changes. How do I create an environment variable I put into... (6 Replies)
Discussion started by: guessingo
6 Replies
2. Programming
I have the following piece of code. Currently the command line arguments are passed as shown below using the "= "sign. I capture the name of the argument, for example vmod and it's corresponding user parameter which is jcdint-z30.cmd.
./raytrac vmod=jcdint-z30.cmd srFile=jcdint.sr
Now I want... (12 Replies)
Discussion started by: kristinu
12 Replies
3. UNIX for Dummies Questions & Answers
Hi
my requriment is read the file name dynamically my code is
#!/bin/sh
file="/c/work/loan/"
Header_Trailer_move()
{
sed '1d;$d' $file| cat >sam.txt
}
Header_Trailer_move
in above given path my list of files or there i have to read file dyanamically when i entered particular file name... (2 Replies)
Discussion started by: sgoud
2 Replies
4. Shell Programming and Scripting
Hi All
At the moment the following code works but ideally i do not want to have to change the original $1
tr "\r" "\n" < "$1" > "$1.fix"
printf "\n" >> "$1.fix"
mv "$1.fix" "$1"
FILE=$1
coffee_out="splitmovie"
coffee_fill="-splitAt"
coffee_end="-self-contained -o output.mov $2"... (1 Reply)
Discussion started by: babajuma
1 Replies
5. Linux
Hello everyone I recently clone a system and doing so it gave my nics cards id's of eth3 and eth4 instead of eth0 and eth1. Is there a config file or something out there where I can change these back? All help will be appreciated. (2 Replies)
Discussion started by: aojmoj
2 Replies
6. Shell Programming and Scripting
I have a directory with its subdirectories and files. I want to change them all to read only. Say it is ~/test
chmod -R 444 ~/test
chmod: `/home/myname/test': permission denied
I do not understand. Do I have to have executable mode for a diirectory to access.
How can I change ~/test to... (5 Replies)
Discussion started by: lalelle
5 Replies
7. Programming
Hey,
First of all I want to know How do I see the atime of a file ?? Whats the command ??
I think ls -l shows the last modified time right ? Because when I use cat to read a file, the timestamp shown by ls -l does not change.
Its not ls -lu ! man ls did not help ! How do I see the last... (8 Replies)
Discussion started by: tantric
8 Replies
8. UNIX for Dummies Questions & Answers
Hi friends how can we read array elements dynamically in bash shell? (1 Reply)
Discussion started by: haisubbu
1 Replies
9. Shell Programming and Scripting
I have a tab delimited file which has 27 character fields. The file needs to be loaded into an Oracle table. But the challenge is that everytime the file comes it may or may not have values in all 27 fields.
Column Definition of the 27 fields:
TYPE: Char (1)
NAME: Char (30)
CUSTOM_VAL: Char... (8 Replies)
Discussion started by: madhunk
8 Replies
explain_creat_or_die(3) Library Functions Manual explain_creat_or_die(3)
NAME
explain_creat_or_die - create and open a file creat and report errors
SYNOPSIS
#include <libexplain/creat.h>
void explain_creat_or_die(const char *pathname, int mode);
DESCRIPTION
The explain_creat_or_die function is used to call the creat(2) system call. On failure an explanation will be printed to stderr, obtained
from explain_creat(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
explain_creat_or_die(pathname, mode);
pathname
The pathname, exactly as to be passed to the creat(2) system call.
mode The mode, exactly as to be passed to the creat(2) system call.
Returns:
This function only returns on success. On failure, prints an explanation and exits.
SEE ALSO
creat(2)
open and possibly create a file or device
explain_creat(3)
explain creat(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
explain_creat_or_die(3)