08-20-2001
=(
thanks, now i need to know how to get it to parse..
i had already tried the man pages for awk (but they didnt really help me figure much of anything out)
and i tried using it with awk like:
cat file | awk '(print $1)' > testfile
and its giving me parse errors
so i tried to pipe it from grep and get the same thing
awk: cmd. line:1: (print $1)
awk: cmd. line:1: ^ parse error
awk: cmd. line:2: (print $1)
awk: cmd. line:2: ^ unexpected newline
so i move the > testfile to right afer ther $1)' (took out the whitespace) and got the same thing. Im not all that good with scripting or debugging so if I could get some help on this one too please. btw, I'm also using slackware on 2.2.19 if that helps any.
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello,
I am wondering if you can assist with my question and ask kindly for this.
I have a number of files that are listed as file1.gz through file100.gz.
I am trying to perform a grep on the files and find a specific date that only resides within within one of the files. There are... (3 Replies)
Discussion started by: legharb
3 Replies
2. Shell Programming and Scripting
Hi,
TASK 1:
I have been using this code to print the information of files kept at "/castor/cern.ch/user/s/sudha/forPooja" in some text file name FILE.txt.
rfdir /castor/cern.ch/user/s/sudha/forPooja | grep data | awk '{print "rfio:///castor/cern.ch/user/s/sudha/forPooja/"$9}' > FILE.txt
... (6 Replies)
Discussion started by: nrjrasaxena
6 Replies
3. Shell Programming and Scripting
Hi Guys,
I'm trying to write an script that will be launched by a user. The script will look at a log file and check for alerts with the date (supplied by user) and a machine's hostname (also supplied by the user). I'm trying to get the output formatted just like the log file.
The logfile looks... (5 Replies)
Discussion started by: illgetit
5 Replies
4. UNIX for Dummies Questions & Answers
I have a flat file that looks like this, let's call it Chromosome_9.txt:
FT /Gene_Name="Guanyl-Acetylase 9"
FT /Gene_Number"36952"
FT /Gene_Name="Endoplasmic Luciferase"
FT /Gene_Number"36953"
FT ... (4 Replies)
Discussion started by: Twinklefingers
4 Replies
5. UNIX for Dummies Questions & Answers
I have been using grep to output whole lines using a pattern file with identifiers (fileA):
fig|562.2322.peg.1
fig|562.2322.peg.3
fig|562.2322.peg.3
fig|562.2322.peg.3
fig|562.2322.peg.7
From fileB with corresponding identifiers in the second column:
NODE_0 fig|562.2322.peg.1 peg ... (2 Replies)
Discussion started by: Mauve
2 Replies
6. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
7. Shell Programming and Scripting
HI all,
I have data in a file that looks like this:
1 HOW _ NNP NNP _ 3 nn _ _
2 DRUGS _ NNP NNP _ 3 nn _ _
3 ACT _ NNP NNP _ 0 null _ _
4 : _ ... (3 Replies)
Discussion started by: owwow14
3 Replies
8. UNIX for Dummies Questions & Answers
Hi Everybody! First post! Totally noobie.
I'm using the terminal to read a poorly formatted book.
The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this.
I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies
9. Solaris
Solaris 10 x86 VM was shipped with four NICs, two each teamed together. We don't want or need. I ifconfig downed e1000g2 and e1000g3 and removed their /etc/hostname.* entries. But the kernel still sees those devices, and I'm not sure how to remove them. They have been removed from the VM... (5 Replies)
Discussion started by: jnojr
5 Replies
10. Shell Programming and Scripting
Hi all, I have a query that runs that outputs data in the following format -
01/09/12 11:43:40,ADMIN,4,77,Application Group Load: Name(TESTED) LoadId(5137-1-0-1XX-15343-15343) File(/dir/dir/File.T03.CI2.RYR.2012009.11433350806.ARD) InputSize(5344) OutputSize(1359) Rows(2) Time(1.9960)... (8 Replies)
Discussion started by: jeffs42885
8 Replies
LEARN ABOUT DEBIAN
plan9-split
SPLIT(1) General Commands Manual SPLIT(1)
NAME
split - split a file into pieces
SYNOPSIS
split [ option ... ] [ file ]
DESCRIPTION
Split reads file (standard input by default) and writes it in pieces of 1000 lines per output file. The names of the output files are xaa,
xab, and so on to xzz. The options are
-n n Split into n-line pieces.
-l n Synonym for -n n, a nod to Unix's syntax.
-e expression
File divisions occur at each line that matches a regular expression; see regexp(7). Multiple -e options may appear. If a subex-
pression of expression is contained in parentheses (...), the output file name is the portion of the line which matches the subex-
pression.
-f stem
Use stem instead of x in output file names.
-s suffix
Append suffix to names identified under -e.
-x Exclude the matched input line from the output file.
-i Ignore case in option -e; force output file names (excluding the suffix) to lower case.
SOURCE
/src/cmd/split.c
SEE ALSO
sed(1), awk(1), grep(1), regexp(7)
SPLIT(1)