I suspect a simple quesion


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting I suspect a simple quesion
# 1  
Old 08-13-2010
I suspect a simple quesion

I bet this is really simple but I can only find silly long solutions.

Im trying to read the second word of each line in a file and pipe it out, in Win32 it looks something like:

for /F "tokens=2" %%b in (file.txt) do etc..

Sorry for the probably dumbass question!

# 2  
Old 08-13-2010
Code:
awk '{print $2}' file.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies

2. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

3. UNIX for Advanced & Expert Users

I suspect that my NIC is working in hybridization mode?

Hi, all: The physical network interface card should drop the packets if it doesn't match the MAC address of the NIC. In my PC, however, the packets which shoud be dropped trigger the interrupt function of my own driver and are recieved as skb to be transfered to the upper layer! Why? How... (1 Reply)
Discussion started by: liklstar
1 Replies

4. Programming

noob error quesion

Hey, I a newbie in unix programming. I type the following command if ((configfd = open(CONFIGFILE, O_CREAT | O_WRONLY)) == -1) and the result I get from open is -1, which means error. how can I figure out the cause of the error ? (2 Replies)
Discussion started by: mellowcandle
2 Replies

5. Shell Programming and Scripting

another quesion to merge file

hi experts yesterday, I asked a question that is very like today's quesion, I think this one will be more difficult than yesterday, I really want to get the answer so I post here again file1 arch : x86 install : pass make os : pass make build kernel : pass=100 failed=45 ... (0 Replies)
Discussion started by: yanglei_fage
0 Replies

6. UNIX and Linux Applications

Suspect code in Speech Tools

When ran configure for speech tools 1.2.96-beta (festival speech synthesis) on Slackware 13.0 seems it is erroneously coded. This code sequence gets flagged 5 times http://www.unix.com/images/icons/icon8.gif in configure: int main() { int j= #if __GNUC__ == 3 ... (6 Replies)
Discussion started by: slak0
6 Replies

7. Solaris

xterm quesion

Can we throw a window from solaris to Linux redhat? (1 Reply)
Discussion started by: mokkan
1 Replies

8. Solaris

pam module quesion

quick question about PAM module. Here may pam.conf file. How do I verify that pam modules work correctly? Does it mean when it run cron job, it checks the pam module for authentication? Thanks in advance. # passwd auth required pam_passwd_auth.so.1 # # cron service (explicit... (0 Replies)
Discussion started by: mokkan
0 Replies

9. UNIX for Dummies Questions & Answers

Getting emials with SUSPECT: Prefix

I got some job running on Sun Unix system, which sends the email to outlook client on windows after completion. Few of the emails are coming with SUSPECT: prefixes. I am using unix command mailx to send the message. Messages are simple text Any idea on this Thanks Ashok (1 Reply)
Discussion started by: akrathi
1 Replies

10. UNIX for Dummies Questions & Answers

Another "green horn" quesion.

I have read this thread : http://forums.unix.com/showthread.php?threadid=75 Which was very informative, but I still have a question or two. I am getting ready to put a box together and put UNIX on it so when I buy the first two books listed I can start practicing. That said, what version of... (2 Replies)
Discussion started by: ICE
2 Replies
Login or Register to Ask a Question