Hello All,
I am working on korn shell script.i have 2 questions;
1) I have a file and i am able to capture the arrival time.
the arrival time is capturing as 11:30
ls -ltr aaa.bbb.332121312.*.* | awk -F" " '{print $8}'
11:30
my desired output is 113000
can anyone please suggest me... (2 Replies)
Hi,
I have a file say abc. I get the timestamp in following way:
ls -ltr abc | awk -F" " '{print $6,$7,$8}'
Mar 8 10:23
I need to get the timestamp as :
03-08-2007 10:23:00
Thanks
Sumeet (1 Reply)
I wanted to put "|" this sign at starting and at end of every field but its not working with first field like
Currently the out put is :
abc | abc | abc |
xyz | xyz | xyz |
But I want the out put in this form:
| abc | abc | abc |
| xyz | xyz | xyz |
plz help me. (2 Replies)
Hi everybody,
I just need desired ouput from text file which should have folowing format;
"2007-06-25 00:03:32.926+05:30",12354369,"Load","Completed","Rs.-5,556.00",9452217714
"2007-06-25 00:06:57.357+05:30",12354371,"Load","Completed","Rs.-56.00",9415766266
"2007-06-25... (1 Reply)
Below is the my cide which is working fine but I am not getting the output indesired format.there is some problem in alignment.Can someone help me to correct this?
if ];
then
summary=$(
echo -e "Please review the log file of auto coloclean utility.\n";
echo -e... (2 Replies)
Hi
I have the following file in the unix named emp.
ID,NAME,SAL,DEPT
101,aaa,2000,10
102,bbb,3000,20
103,ccc,4000,30
104,ddd,5000,40
105,aaa,2000,50
106,bbb,3000,60
107,ccc,4000,70
108,ddd,5000,10
109,aaa,2000,80
I need to save first 3 columns(ID, NAME, SAL) in another file with... (2 Replies)
currently I have process from a raw file to this stage
ALTER TABLE "EXCEL_ADMIN"."TC_TXN_VOID" ADD CONSTRAINT "PK_TC_TXN_VOID" PRIMARY KEY ("TC_TXN_IID")
ALTER TABLE "EXCEL_ADMIN"."TC_TXN_AMT" ADD CONSTRAINT "PK_TC_TXN_AMT" PRIMARY KEY ("TC_TXN_AMT_IID")
ALTER TABLE... (10 Replies)
I am reading a file of Linux ( like mentioned below) & the data is represented in a single line like mentioned below:
11/03 4:00 39992 0.098 5.195 0.034 0.001 1.091 182 0.000 0 0.071 4.252 0.033 0.001 666.53
Now i want to print the result in other file something like this :-
39992... (5 Replies)
I need to get the current year for the files that has been created today.
Ex-
when i list in unix console it shows
ls -l abc.txt
-rw-rw-r-- 1 user1 user1 33 May 2 08:58 abc.txt
but i need to get as May 2 2013 , i dont need 08:58 is there any command to list it out in that... (7 Replies)
Discussion started by: Prashanth B
7 Replies
LEARN ABOUT CENTOS
fchdir
CHDIR(2) Linux Programmer's Manual CHDIR(2)NAME
chdir, fchdir - change working directory
SYNOPSIS
#include <unistd.h>
int chdir(const char *path);
int fchdir(int fd);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
fchdir():
_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
DESCRIPTION
chdir() changes the current working directory of the calling process to the directory specified in path.
fchdir() is identical to chdir(); the only difference is that the directory is given as an open file descriptor.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
Depending on the file system, other errors can be returned. The more general errors for chdir() are listed below:
EACCES Search permission is denied for one of the components of path. (See also path_resolution(7).)
EFAULT path points outside your accessible address space.
EIO An I/O error occurred.
ELOOP Too many symbolic links were encountered in resolving path.
ENAMETOOLONG
path is too long.
ENOENT The file does not exist.
ENOMEM Insufficient kernel memory was available.
ENOTDIR
A component of path is not a directory.
The general errors for fchdir() are listed below:
EACCES Search permission was denied on the directory open on fd.
EBADF fd is not a valid file descriptor.
CONFORMING TO
SVr4, 4.4BSD, POSIX.1-2001.
NOTES
The current working directory is the starting point for interpreting relative pathnames (those not starting with '/').
A child process created via fork(2) inherits its parent's current working directory. The current working directory is left unchanged by
execve(2).
SEE ALSO chroot(2), getcwd(3), path_resolution(7)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2010-11-25 CHDIR(2)