I have a file that contains the schedule for a tournament with 41 teams. The team names have spaces in them. I would like to search for each teams schedule and then save that to that teams file
For example
Team name: "Team Two"
I would like to search for all the games for "Team Two" and then the result I would like to save it to a file called Team_Two
All the teams names are in a file called Teams and few of the team names have spaces in them
Code:
TeamOne
Team Two
Team Three
TeamFour
Team Five O
Team Six
Team Seven
and so on ..
Team Forty one.
Code:
$ for i in `cat teams`
do
grep -i "$i" schedule >> $i (how do I replace the space before saving it)
done
The output I would like to expect is Each teams schedule saved in their team name
This is not really urgent but can someone please help me out
Last edited by Scrutinizer; 02-08-2013 at 05:37 PM..
Reason: code tags
It should be pretty simple but I'm just new to IDL and am workling through the command line and scripts(program.pro). If I want to save words to the bottom of a .ps file that I am putting a few plots in what should written in my code.
set_plot works for plots but apparently not words. Print... (0 Replies)
Retaining Spaces within a word
--------------------------------------------------------------------------------
Hi Experts,
I have a 2 GB flat file which have unicode field, some of them are blanks and its size is 4000 character. In the existing system SED command removes the spaces.... (7 Replies)
I am very new to C programming.
How could I write a C program that could count the characters, words, spaces, and punctuations in a text file?
Any help will be really appreciated. I am doing this as part of my C learning exercise.
Thanks,
Ajay (4 Replies)
hi there !
i have exactly the same problem like this guy here
https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html
i am not able to save the curl verbose output..
the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
I make shell script by use "if" statement, what should add it to
shell script save which I enter it in output file txt?
---------- Post updated at 08:27 AM ---------- Previous update was at 05:59 AM ----------
I mean
like this
echo "enter your name"
read name
# now i when start... (1 Reply)
Hey all,
Fist post, so be kind... I have written an expect script which logs into a terminal and gathers several screens of information. Unfortunately the log file gives me all the special escape and control characters from the terminal. I am hoping to use a combination of shell scripting, sed,... (1 Reply)
Hi,
By using shell scripit i have save output in one file. I want to grep two words named CLUSTER and CLUSQMGR from that output file. How to grep that. output file would be having below words
TYPE(QCLUSTER) ALTDATE(2010-05-17)
CLUSTER(QS.CL.MFT1) ... (5 Replies)
Hi All,
I have written a C program to solve this problem but I am eager to know whether the same output can be obtained using sed or awk?
This is the input:
star
ferry
computer
symbol
prime
time
This is the output:
starferry
ferrycomputer
computersymbol
symbolprime
primetime (7 Replies)
Hi all,
Is there a sed/awk cmd that will remove blank space from between words in a particular field, replacing with a single space?
Field containing 'E's in the example below:
Example input file:
AAAAA AA|BBBB|CCCCCCC|DDDDDD |EEEE EEEEEE| FFF FFFFF|
... (6 Replies)
I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below:
Core Utilization
CoreId %Usr %Sys %Total
------ ----- ----- ------
5 4.91 0.01 4.92
6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
LEARN ABOUT DEBIAN
regpatch
REGPATCH(1) [FIXME: manual] REGPATCH(1)NAME
regpatch - Applies registry patches to registry files
SYNOPSIS
regpatch [--help] [--backend=BACKEND] [--credentials=CREDENTIALS] [location] [patch-file]
DESCRIPTION
The regpatch utility applies registry patches to Windows registry files. The patch files should have the same format as is being used by
the regdiff utility and regedit32.exe from Windows.
If no patch file is specified on the command line, regpatch attempts to read it from standard input.
OPTIONS --help
Show list of available options.
--backend BACKEND
Name of backend to load. Possible values are: creg, regf, dir and rpc. The default is dir.
--credentials=CREDENTIALS
Credentials to use, if any. Password should be separated from user name by a percent sign.
VERSION
This man page is correct for version 4.0 of the Samba suite.
SEE ALSO
regdiff, regtree, regshell, gregedit, samba, diff, patch
AUTHOR
This utility is part of the Samba[1] suite, which is developed by the global Samba Team[2].
This manpage and regpatch were written by Jelmer Vernooij.
NOTES
1. Samba
http://www.samba.org/
2. Samba Team
http://www.samba.org/samba/team/
[FIXME: source] 04/16/2014 REGPATCH(1)