Sponsored Content
Full Discussion: changing colomn to the line
Top Forums Shell Programming and Scripting changing colomn to the line Post 302203942 by penchal_boddu on Tuesday 10th of June 2008 07:57:04 AM
Old 06-10-2008
Hi Vgresh,

tr works on strings that input is being provided by cat command.

I dont think i can write like tr "\n" " " filename.

If iam wrong, Please correct me.

Thanks
Penchal
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing Line Number of a File

Example: O o x What I would like to do is to rename the first column of the above file without affecting the format. The output should look like the following: Output: O o x #! /bin/ksh cd $HOME/lib/.Lee #nl = no. of lines. nl=`grep 'X' ex | wc -l` #ln = line no. ln=1 (17 Replies)
Discussion started by: ilak1008
17 Replies

2. Shell Programming and Scripting

switch line to colomn

Hi It's possible to switch the line to colon from a file using Perl or AWK? for example my file have somthing like this: 10 11 12 13 14 20 21 22 23 24 30 31 32 33 34 I want to have a file with the line switched like : 10 20 30 11 21 31 12 22 32 13 23 33 14 24 34 Thanks a lot (4 Replies)
Discussion started by: rauchy
4 Replies

3. AIX

Yesterday's date without changing anything and in one cmd line ?

I have seen references in the forum about getting yesterday's date but it is either by changing something in the system (date, time zone, ...) or with more then one line of script cmds. How can I get yesterday's date without changing anything in the system and in one single command line ? (4 Replies)
Discussion started by: Browser_ice
4 Replies

4. Shell Programming and Scripting

changing from command line to perl script

I had posted previously about this problem I had. I have multiple text files with hundreds of lines of the following type: 2000001 34 54 234 2000001 32 545 2000001 -2000001 77 2000001 44 2000001 998 2000001 77 32 2000001 45 23 111 89 98 75 23 34 999 . . . etc... What I wanted was... (2 Replies)
Discussion started by: xchen89x
2 Replies

5. Shell Programming and Scripting

changing line on a file

Hi, I want to change on a file this line: vif = into: vif = But there are some conditionals: 1. last part '] of the original line after 00:16:3E:CE:23:14' ] may vary to 00:16:3E:CE:23:14' ] or 00:16:3E:CE:23:14 ' ] 2. The second mac adrress of the line I need,... (4 Replies)
Discussion started by: iga3725
4 Replies

6. Shell Programming and Scripting

How to exclude certain colomn from the file?

Hi I have a file in the following format: 4135 f4135acc: 39798 rmtdb: 0 /t1/data/f4135acc.dta 4135 f4135pdb: 39795 rmtdb: 0 /bb/data/f4135pdb.dta 4135 p4135eng: 0 rmtdb: 0 /bb/bin/p4135eng 4135 r4135eng: 14142 rmtdb: 0 ... (6 Replies)
Discussion started by: aoussenko
6 Replies

7. Shell Programming and Scripting

Need help in changing vertical lines to horizontal line in a file

Hi, I have a file like below robert PREF: 3 AVAIL: henry PREF: 234 AVAIL: john PREF: 145,178 AVAIL: 123 matt PREF: 564,932 AVAIL: ten PREF: 389 AVAIL: kill (2 Replies)
Discussion started by: rocky1954
2 Replies

8. Shell Programming and Scripting

Need Help!!! For changing the content of the line

I need to change the content of the line after I grep it. The line is : Date SNWD.I-1 (in) WTEQ.I-1 (in) PREC.I-1 (in) TOBS.I-1 (degC) TMAX.D-1 (degC) TMIN.D-1 (degC) TAVG.D-1 (degC) I want to change the second column (SNWD.I-1(in)) to SNWD.I-1(m), how could I do that? I use csh... (2 Replies)
Discussion started by: handsonzhao
2 Replies

9. Shell Programming and Scripting

Changing Line in Txt File

So I have a python program that I run, which runs accordingly to options I have listed in a text file (ie user_prefs). Now there are many options listed in this user_prefs.txt, but the one of most interest to me is that of the file path of the time series. I have over a hundred of these time... (8 Replies)
Discussion started by: Jimmyd24
8 Replies

10. UNIX for Beginners Questions & Answers

Remove duplicate in colomn

i have a file which have two columns, 2nd column have duplicate values and i want to delete and keep only distinct on basis on 2nd column. -bash-4.1$ cat file_re 7440 713543695 7441 713543695 4603 714457614 4602 714457614 40301 717937765 40281 717937765 33741 721208982... (2 Replies)
Discussion started by: mirwasim
2 Replies
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a filename containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 01:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy