Sponsored Content
Homework and Emergencies Homework & Coursework Questions Help with Simple Perl/Python Script Post 302368786 by Swapnilsagarwal on Thursday 5th of November 2009 03:58:53 PM
Old 11-05-2009
Help with Simple Perl/Python Script

I have the following problem, which I need done in Perl/ or Python using Unix/linux filters...

1. You have a very large file, named 'ColCheckMe', tab-delmited, that you are asked to process. You are told that each line in 'ColCheckMe' has 7 columns, and that the values in the 5th column are integers.
Using Perl/python (and standard LINUX/UNIX filters), indicate how you would verify that these conditions were satisfied in 'ColCheckMe'


2. In the same file, you are told that each value in column 1 is unique. How would you verify that?


3. Write a shell function that counts the number of occurrences of the word “SpecStr” in the file 'ColCheckMe'.


Thanks a lot
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simple Perl Script to Screen Display

$number_clients++; print("Creating client $number_clients\r"); I have been using the above to increment on the screen as the script increments throughout a while loop. What I would like to know is what is the trick to keep the last one on the screen without printing it again? Ie ... (1 Reply)
Discussion started by: Shakey21
1 Replies

2. Shell Programming and Scripting

simple perl script not working

why won't below work? I am trying to see a)sipfile has username of the system. b)it will read the sipfile and do a grep function against the /etc/passwd c)it will save that output to /tmp/result.. but my script is just hanging... #!/usr/bin/perl -w open(SIPFILE, "</tmp/sipfile") ... (4 Replies)
Discussion started by: hankooknara
4 Replies

3. UNIX for Dummies Questions & Answers

Not able to run the simple perl script

Hi Experts, I have written simple perl script, which assign the value to variable and print it. Following is the script: $ cat 3.pl #!/usr/bin/env ksh #!/usr/bin/perl print "Hello World"; $iputlne = 34; print $iputlne; The error output is: $ /usr/bin/env perl 3.pl Hello World... (9 Replies)
Discussion started by: Amey Joshi
9 Replies

4. Shell Programming and Scripting

Help with Simple Perl/Python Script

I have the following problem, which I need done in Perl/ or Python using Unix/linux filters... 1. You have a very large file, named 'ColCheckMe', tab-delmited, that you are asked to process. You are told that each line in 'ColCheckMe' has 7 columns, and that the values in the... (1 Reply)
Discussion started by: Swapnilsagarwal
1 Replies

5. Shell Programming and Scripting

Hopefully a simple script, bash or perl...

I'm attempting to parse a file whose contents follow this format; 4:/eula.1028.txt: 8:/eula.1031.txt: 19:/eula.1033.txt: 23:/eula.1036.txt: 27:/eula.1040.txt: 31:/eula.1041.txt: 35:/eula.1042.txt: 39:/eula.2052.txt: 43:/eula.3082.txt: The number of lines of the file... (4 Replies)
Discussion started by: CudaPrime
4 Replies

6. Shell Programming and Scripting

Python/Perl script for auto login

I am loooking for a python/perl script which can login to gmail or any mail accounts and open a browser with the logged in page. I am trying this in a windows environment. I tried many docs available over internet an nothing seems to be working. (4 Replies)
Discussion started by: Tuxidow
4 Replies

7. 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

8. OS X (Apple)

Python script to do simple audio capture...

This site is the first to get this snippet. It will capture an audio recording of any time length within the limits of OSX's QuickTime Player's capablility... A shell script derivative of this will be used as a further capture for CygWin's AudioScope.sh. Thoroughly read ALL the comments in... (0 Replies)
Discussion started by: wisecracker
0 Replies

9. Shell Programming and Scripting

Covert simple bash script in perl language

Hello, Anyone please covert this in perl language ######################## if ps faux | grep -v grep | grep ProcessXYZ then echo "$SERVICE is running, , everything is fine" exit 0 else echo "$SERVICE is not running" exit 2 fi Additional... (1 Reply)
Discussion started by: fed.linuxgossip
1 Replies

10. Shell Programming and Scripting

Can someone convert this python script to perl

There is a python script that I would like converted to a perl script. If someone has the time to convert the script I would appreciate it. You can find the script below: reboot-mb8600/reboot-mb8600.py at master . j4m3z0r/reboot-mb8600 . GitHub #!/usr/bin/python ''' A hacky script to... (1 Reply)
Discussion started by: azdps
1 Replies
ERIC4_RE(1)						      General Commands Manual						       ERIC4_RE(1)

NAME
eric4_re - a GUI editor for Python style regular expressions SYNOPSIS
eric4_re [options] DESCRIPTION
This manual page documents briefly the eric4_re command. This manual page was written for the Debian distribution because the original program does not have a manual page. eric4_re is a graphical editor and debugger for Python style regular expressions (using the Python re module). It has support for all of Python's own syntax extensions like named groups. This program is a part of the eric4 IDE but can be used as a standalone application as well. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. -h, --help Show summary of options. -v, --version Show version of program. SEE ALSO
eric4(1), eric4_api(1), eric4_compare(1), eric4_configure(1), eric4_diff(1), eric4_doc(1), eric4_editor(1), eric4_helpviewer(1), eric4_iconeditor(1), eric4_plugininstall(1), eric4_pluginrepository(1), eric4_pluginuninstall(1), eric4_qregexp(1), eric4_sqlbrowser(1), eric4_tray(1), eric4_trpreviewer(1), eric4_uipreviewer(1), eric4_unittest(1), eric4_webbrowser(1) AUTHOR
This manual page was written by Torsten Marek <shlomme@gmx.net>, for the Debian project (but may be used by others). January 31, 2010 ERIC4_RE(1)
All times are GMT -4. The time now is 10:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy