10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
consider the contents of a file has many stuff including few stuff that i need.. so i perfromed the below function
cat filename | grep "ALTER TABLE"
its output is as shown below
.
.
.
.
. SET @sql:=CONCAT('ALTER TABLE RecordMixProfile AUTO_INCREMENT=', @maxId) ;
SET... (14 Replies)
Discussion started by: vivek d r
14 Replies
2. Shell Programming and Scripting
say I'm doing awk 'NR==534'
Is there a way to display 534 535 536 537?
without appending to a variable? per line? maybe an easier way with a different command?
My first impression was NR==534-537 but that would be too easy :P (2 Replies)
Discussion started by: puttster
2 Replies
3. Shell Programming and Scripting
Hello
Wondering if anybody may be able to advise on how I can filter the contents of the following file:
<object_name>-<version> <Instance>
GM_GUI_code.fmb-4 1
GM_GUI_code.fmb-5 1
GM_GUI_code.fmx-4 ... (7 Replies)
Discussion started by: Glyn_Mo
7 Replies
4. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Display from a csv file, birthdays that occur today. If there are no birthdays today, the next one in the year.
2. Relevant commands, code, scripts, algorithms:
The csv file is ordered from older to younger (ie. the most recent... (8 Replies)
Discussion started by: Adzi
8 Replies
5. Shell Programming and Scripting
Howdy.
I know this is most likely possible using sed or awk or grep, most likely a combination of them together, but how would one go about running a grep like command on a file where you only try to match your pattern to the second field in a line, space delimited?
Example:
You are... (3 Replies)
Discussion started by: LordJezoX
3 Replies
6. Shell Programming and Scripting
Hi,
I am using below command to display the number of line, but its returning no of lines along with file name.
But i want only no of line in the variable p.
Please help me on this?
p=`wc -l "text file"`
echo "$p" (6 Replies)
Discussion started by: shivanete
6 Replies
7. Shell Programming and Scripting
Hi folks,
I am looking for a solution to display those lines in any file that contains 80 or more characters along with their corresponding line number in the file.
The below script will print the lines with their corresponding line numbers...
sed = Sample.cpp | sed 'N;s/\n/\t/;... (8 Replies)
Discussion started by: frozensmilz
8 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to figure out how to display a certain line in a text file. I keep getting references to Tail and Head, and I know how these work, but i'm lost on how to find say the third out of the five lines and display only that.
I thought maybe grep could help, but that doesn't seem likely.
... (3 Replies)
Discussion started by: MaestroRage
3 Replies
9. Shell Programming and Scripting
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (2 Replies)
Discussion started by: aga
2 Replies
10. UNIX for Dummies Questions & Answers
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (4 Replies)
Discussion started by: aga
4 Replies