01-10-2020
Thanks for the reply. I agree sir to use ascii, but we can't change the filename because our application read in filename.
10 More Discussions You Might Find Interesting
1. Red Hat
If PATH is set to ../bin:../sbin:/usr/bin:/usr/local/bin (chunk of path string). Sometime when I try to execute ls command it says ../bin/ls not found. According to my understanding "ls" should be searched in all the path varibales that we set in the PATH varaibale.
Is there any reason for the... (5 Replies)
Discussion started by: hansini
5 Replies
2. UNIX for Dummies Questions & Answers
hello
On Debian Lenny, I first ran apt-get install git-core and then removed it to install from source. The trouble is that when I typed git --version, I am get:
-bash: /usr/bin/git: No such file or directory
of course, git is now in /usr/local/bin
I don't understand why since... (1 Reply)
Discussion started by: JCR
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I logged in to the unix solaris with my user name and then I again logged in with the sudo bash -l command
now when I do echo $PATH
It shows me => /usr/bin:/usr/local/bin:/usr/bin/usr/sbin:/usr/ucb:/usr/local/bin
How do i find out where is this file located for setting the... (3 Replies)
Discussion started by: siddhans
3 Replies
4. Shell Programming and Scripting
This is weirdly a linux question I suppose.
Im having a problem with this code the file path is fine if I don't use the ~ and put in the user /Users/tempuser/....
This will be installed on more than one computer and changing the plist for every install is going to become tedious.
Is there... (1 Reply)
Discussion started by: digitalviking
1 Replies
5. UNIX for Dummies Questions & Answers
I use the following command to print the current directory above the command prompt
set prompt="`exec pwd`\n$USER@`hostname -s` %B: % > "
The output is something like this
<current path>
$USER@hostname >
But when I try to CD to any other directory and press the return key, the... (6 Replies)
Discussion started by: aelhosiny
6 Replies
6. Shell Programming and Scripting
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies
7. Shell Programming and Scripting
Greetings Experts,
I need to pass a parameter to ksh and the value is windows path eg: sh abc.txt C:\Users\chill3chee\Desktop
No matter I try with \ delimiter, still could not get this exact value assigned to the shell variable which was checked with echo. Tried with using... (2 Replies)
Discussion started by: chill3chee
2 Replies
8. UNIX for Advanced & Expert Users
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies
9. AIX
Hello,
I have encountered the issue on my AIX 6.1. As you can see below, the hdisk1 & hdisk8 are not recognized by the system
/ > lspv
hdisk0 00fa6d1288c820aa rootvg active
hdisk1 00fa6d1288c8213c None
hdisk2 ... (9 Replies)
Discussion started by: Phat
9 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
FOPEN(3) Library Functions Manual FOPEN(3)
NAME
fopen, freopen, fdopen - open a stream
SYNOPSIS
#include <stdio.h>
FILE *fopen(const char *filename, const char *type)
FILE *freopen(const char *filename, const char *type, FILE *stream)
FILE *fdopen(int fildes, const char *type)
DESCRIPTION
Fopen opens the file named by filename and associates a stream with it. Fopen returns a pointer to be used to identify the stream in sub-
sequent operations.
Type is a character string having one of the following values:
"r" open for reading
"w" create for writing
"a" append: open for writing at end of file, or create for writing
In addition, each type may be followed by a "+" to have the file opened for reading and writing. "r+" positions the stream at the begin-
ning of the file, "w+" creates or truncates it, and "a+" positions it at the end. Both reads and writes may be used on read/write streams,
with the limitation that an fseek, rewind, or reading an end-of-file must be used between a read and a write or vice-versa.
Freopen substitutes the named file in place of the open stream. It returns the original value of stream. The original stream is closed.
Freopen is typically used to attach the preopened constant names, stdin, stdout, stderr, to specified files.
Fdopen associates a stream with a file descriptor obtained from open, dup, creat, or pipe(2). The type of the stream must agree with the
mode of the open file.
SEE ALSO
open(2), fclose(3).
DIAGNOSTICS
Fopen and freopen return the pointer NULL if filename cannot be accessed, if too many files are already open, or if other resources needed
cannot be allocated.
BUGS
Fdopen is not portable to systems other than UNIX.
The read/write types do not exist on all systems. Those systems without read/write modes will probably treat the type as if the "+" was
not present. These are unreliable in any event.
4th Berkeley Distribution May 27, 1986 FOPEN(3)