Sponsored Content
Top Forums UNIX for Advanced & Expert Users Help using Awk and cut with a text file Post 302586610 by ziggy6 on Monday 2nd of January 2012 05:43:06 PM
Old 01-02-2012
Quote:
Originally Posted by bartus11
Try:
Code:
awk "\$5==$a" filename

bartus11, thanks for the help. That didn't give the results I was expecting. I know that it is the 5th field but it did not yeild the results I guess you thought it would. That is why I tried to use cut with awk so that I could key off of the Account Number: and then search and cut 56-60. Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to cut a text file at a certain spot?

Say I do a date command and get the time from 15 minutes ago. I have a text file with the date printed out every minute or so and I want to cut the file at the date stamp given to me by the 15 minute ago time stamp. Is there an easy way to do this? Example: date +%M gives me 56 I... (2 Replies)
Discussion started by: LordJezo
2 Replies

2. Shell Programming and Scripting

how to cut a field of a line in a text file?

Hi, I have text file which contains lines like : a/a/a/a/.project b/b/b/b/b/.project c/c/c/.project d/.project e/e/e/e/.project i want for all lines the last word .project should be removed and the file should look like : a/a/a/a/ b/b/b/b/b/ c/c/c/ .... how to proceed... (7 Replies)
Discussion started by: bhaskar_m
7 Replies

3. Shell Programming and Scripting

Cut big text file into 2

I have a big text file. I want to cut it into 2 pieces at known point or I know the pattern of the contents from where it can separate the files. Is there any quick command/solution? (4 Replies)
Discussion started by: sandy221
4 Replies

4. Shell Programming and Scripting

Help need to cut the first word of a line in text file

Hi All, I would like help with a script which can get rid of the first work of all lines in text file. File 1 The name is Scott. Output : name is Scott ---------- Post updated at 02:38 PM ---------- Previous update was at 02:37 PM ---------- Hi ALL There is typo error in... (3 Replies)
Discussion started by: bubbly
3 Replies

5. Shell Programming and Scripting

cut the second line in a text file

Hi I have some problem to cut out the second line in a output file and send to a new file it's a #!/bin/bash script 1 something 2 something 3 something and after I cut 1 something 3 something New file 2 something Thanks in advance (7 Replies)
Discussion started by: pelle
7 Replies

6. UNIX for Dummies Questions & Answers

Cut text from a file

How can I cut the text of definite length say from line no. 20 to 1000? It is trivial ques, but I am very new to Unix. Thanks :) (3 Replies)
Discussion started by: JackR
3 Replies

7. Shell Programming and Scripting

editing file with awk cut and sed

HI All, I am new to unix. I have a file would like to do some editing by using awk, cut and sed. Could anyone help? This file contain 100 lines. There are one line for example: 2,"102343454",5060,"579668","579668","579668","SIP",,,"825922","035885221283026",1,268,"00:59:00.782 APR 17... (2 Replies)
Discussion started by: mimilaw
2 Replies

8. UNIX for Dummies Questions & Answers

How to cut from a text file based on value of a specific column?

Hi, I have a tab delimited text file from which I want to cut out specific columns. If the second column equals one, I want to cut out columns 1 and 5 and 6. If the second column equals two, I want to cut out columns 1 and 5 and 7. How do I go about doing that? Thanks! (4 Replies)
Discussion started by: evelibertine
4 Replies

9. Shell Programming and Scripting

Cut text file in place

I have a file that i want to take only the first part of it and discard the rest, to be accurate,I need the first 137097 lines but I cant use split because I dont have enough space on my disck. I need sth to cut the file in its place (3 Replies)
Discussion started by: Heidi Heweidy
3 Replies

10. Shell Programming and Scripting

Cut text from a file and remove

Hello Friends, I am stuck with the below problem.Any help will be appreciated. I have a file which has say 100 lines. On the second last line I have a line from which i want to remove certain characters.. e.g CAST(CAST( A as varchar(50)) || ',' || CAST(CAST( B as varchar(50)) || ',' ||... (8 Replies)
Discussion started by: vital_parsley
8 Replies
tsm(1)							      General Commands Manual							    tsm(1)

NAME
tsm - Terminal Session Manager SYNOPSIS
DESCRIPTION
allows a user to interact with more than one shell or application (session) from a single terminal. Each session is bound to a virtual device emulating the physical terminal. The emulation includes maintaining display state, softkeys, and terminal modes for each session. The virtual device can be manipulated like the actual terminal by using and (see stty(1) and ioctl(2)). Additionally supports cut and paste between sessions, and provides an interface for a local lp device. Each session has its own process group ID. Definitions A session is if it is being displayed and is the recipient of keyboard input. The is: Configuration files and such are searched for in the order indicated and defined by these paths. Commands There are two methods of interacting with a pull-down menu, and a command line interface. The pull-down menu (when configured) can be activated from a session by pressing the (default is and should be self explanatory. The command line interface can be activated by press- ing the (default is in a session. Pressing a "hot key" twice passes the "hot key" character to the session instead of activating command or menu mode. Commands to generally have single character invocation, in some cases the user is prompted for more input. The following commands can be issued from the prompt level: Pressing a number at the command prompt selects the session of the same number to become the current session. Select the next higher numbered session. Select the next lower numbered session. Select the last session. Display a help screen describing commands. Copy (cut): Three types: o Text (Lines including new-lines). This is the default. Select with when cut prompt is displayed. o String (Lines strung together with white space in place of new-lines). Select with when cut prompt is displayed. o Block (A rectangle). Select with when cut prompt is displayed. The user is prompted for the "cut extents". The extents are defined by using arrow keys or the keys and to move the cursor as desired. Pressing the space bar aborts the cut operation. The selected text is placed in the Trailing whitespace and character attribute information are ignored. Paste: the contents of the is echoed to the current session as if it were typed from the keyboard. Run a program as a new session. The user is prompted for the program name. Start a new session containing a shell. Output the current display to a printer (screen dump). The print mechanism is specified in a file named searched for in the standard way. Character attribute information is ignored. Load the softkeys of the current session from a file. To load defaults, specify "file" To load terminal defaults, specify "file" Same as above but softkeys are loaded "globally" into all sessions. Access extended commands as described in the reference manual or on the help screen. Quit is sent to all processes started under and exits. EXTERNAL INFLUENCES
In general environment variables must be set prior to invocation. is the lp(1) name of a printer that gets its output redirected to the printer port of the terminal. specifies an alternate search path for tsm files. specifies an alternate terminal information file to be used by instead of that specified by specifies an alternate hotkey for invocation ot the command line. WARNINGS
Some operations are not supported on certain terminals. does not support long user and group names on the current release, HP-UX 11i V3. AUTHOR
was developed by Structured Software Solutions, Inc. FILES
main configuration file (default). Copy to for user customization. softkey configuration file (default). Copy to for user customization. terminal description files SEE ALSO
shl(1), tsm.info(1), tsm.command(1), tsm.lpadmin(1M). tsm(1)
All times are GMT -4. The time now is 12:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy