05-21-2008
Please provide an example of part of your file.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to capture a file's creation/modification date and time and convert this to a different format, whilst I can easily get the existing format from a ls -l | awk ' { print $......}' or a cut command I do not know how to convert it to a desired format?
I should add that at present the ls -l... (1 Reply)
Discussion started by: barney_clough
1 Replies
2. Shell Programming and Scripting
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies
3. Shell Programming and Scripting
Hi,
I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix.
My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies
4. Shell Programming and Scripting
Dear Friends,
We have date in output as MM/DD/YYYY format and I want to convert it in DD/MM/YYYY format.
e.g.
12/31/2010 to 31/12/2010
We have checked forum for the solution but we are not getting matching query.
Please guide us
Thanks
Anushree. (6 Replies)
Discussion started by: anushree.a
6 Replies
5. UNIX for Advanced & Expert Users
Hi All,
I am new to this forum, could any one help me out in resolving the below issue.
Input of the flat file contains several lines of text for example find below:
5022090,2,4,7154,88,,,,,4/1/2011 0:00,Z,L,2
5022090,3,1,6648,88,,,,,4/1/2011 0:00,Z,,1... (0 Replies)
Discussion started by: av_sagar
0 Replies
6. Shell Programming and Scripting
Hi All,
I am new to this forum. Could anyone help me to resolve the following issue.
Input of the flat file contains several lines of text for example find below:
5022090,2,4,7154,88,,,,,4/1/2011 0:00,Z,L,2
5022090,3,1,6648,88,,,,,4/1/2011 0:00,Z,,1
5022090,4,1,6648,88,,,,,4/1/2011... (6 Replies)
Discussion started by: av_sagar
6 Replies
7. Shell Programming and Scripting
Dear all,
I have 2 questions.
I have a file with many rows which has date of the format YYYYMMDD.
1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too.
2. After converting the date to... (10 Replies)
Discussion started by: 2001.arun
10 Replies
8. UNIX for Dummies Questions & Answers
Hi Unix Gurus,
I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Discussion started by: pchegoor
1 Replies
9. Shell Programming and Scripting
Hi
i try to change the date-format from DD/MM/YYYY into MM/DD/YY.
Input-Data:
...
31/12/2013,23:40,198.00,6.20,2,2,2,1,11580.0,222
31/12/2013,23:50,209.00,7.30,2,2,3,0,4380.0
01/01/2014,00:00,205.90,8.30,2,2,3,1,9360.0,223
...
Output-Data should be:
...... (7 Replies)
Discussion started by: IMPe
7 Replies
LEARN ABOUT OPENSOLARIS
rsh
rsh(1M) System Administration Commands rsh(1M)
NAME
rsh, restricted_shell - restricted shell command interpreter
SYNOPSIS
/usr/lib/rsh [-acefhiknprstuvx] [argument]...
DESCRIPTION
rsh is a limiting version of the standard command interpreter sh, used to restrict logins to execution environments whose capabilities are
more controlled than those of sh (see sh(1) for complete description and usage).
When the shell is invoked, it scans the environment for the value of the environmental variable, SHELL. If it is found and rsh is the file
name part of its value, the shell becomes a restricted shell.
The actions of rsh are identical to those of sh, except that the following are disallowed:
o changing directory (see cd(1)),
o setting the value of $PATH,
o pecifying path or command names containing /,
o redirecting output (> and >>).
The restrictions above are enforced after .profile is interpreted.
A restricted shell can be invoked in one of the following ways:
1. rsh is the file name part of the last entry in the /etc/passwd file (see passwd(4));
2. the environment variable SHELL exists and rsh is the file name part of its value; the environment variable SHELL needs to be set
in the .login file;
3. the shell is invoked and rsh is the file name part of argument 0;
4. the shell is invoke with the -r option.
When a command to be executed is found to be a shell procedure, rsh invokes sh to execute it. Thus, it is possible to provide to the end-
user shell procedures that have access to the full power of the standard shell, while imposing a limited menu of commands; this scheme
assumes that the end-user does not have write and execute permissions in the same directory.
The net effect of these rules is that the writer of the .profile (see profile(4)) has complete control over user actions by performing
guaranteed setup actions and leaving the user in an appropriate directory (probably not the login directory).
The system administrator often sets up a directory of commands (that is, /usr/rbin) that can be safely invoked by a restricted shell. Some
systems also provide a restricted editor, red.
EXIT STATUS
Errors detected by the shell, such as syntax errors, cause the shell to return a non-zero exit status. If the shell is being used non-
interactively execution of the shell file is abandoned. Otherwise, the shell returns the exit status of the last command executed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
intro(1), cd(1), login(1), rsh(1), sh(1), exec(2), passwd(4), profile(4), attributes(5)
NOTES
The restricted shell, /usr/lib/rsh, should not be confused with the remote shell, /usr/bin/rsh, which is documented in rsh(1).
SunOS 5.11 1 Nov 1993 rsh(1M)