Search Results

Search: Posts Made By: steezuschrist96
2,634
Posted By steezuschrist96
How to make a dynamically linked executable file?
So I have a file called queens.cc and I need to do the following:

Compile and make a .o file while specifying that the compiler is to search /student/214/include for system include files.
Use...
2,400
Posted By steezuschrist96
Oh okay I see, thank you!
Oh okay I see, thank you!
2,400
Posted By steezuschrist96
How to use awk to print strings with anchors?
I have a list of countries and I'm trying to print the country names that start with "A" and end in "a".

I can do the first one which gives me the correct output.

awk '/^A/ {print $1}'...
15,049
Posted By steezuschrist96
How to use stdin as argument for script?
Say I had an extremely simple script called testScript.sh:


#!/bin/sh
echo $1

and I invoked it as:

source testScript.sh <<< x

or

source testScript.sh <<< inputFile.txt

When I do...
1,211
Posted By steezuschrist96
I also found that the following works as well. ...
I also found that the following works as well.

name=$(echo $inputFile | cut -d'_' -f1)
minor=$(echo $inputFile | cut -d'_' -f3 | cut -d'.' -f1)
major=$(echo $inputFile | cut -d'_' -f2)...
1,211
Posted By steezuschrist96
How do I separate a portion of a file name to use grep on?
I'm trying to write a script that takes a file name in the form of Name_Num1_Num2.Extension and I want to separate the name portion and then use grep to see if that name part has any illegal...
4,328
Posted By steezuschrist96
My apologies, by large I meant and should have...
My apologies, by large I meant and should have written "capitalized".

Thank you for your suggestion I will now post replies instead of edits. I just wanted to add to what I had been trying as a...
4,328
Posted By steezuschrist96
I'm so sneaky with my large *EDIT:* tag.
I'm so sneaky with my large *EDIT:* tag.
4,328
Posted By steezuschrist96
Would env $GREP_OPTIONS="-i" work? ...
Would
env $GREP_OPTIONS="-i"
work?


*EDIT:*
Actually I got env GREP_OPTIONS=-i grep a <<< A to work.


env GREP_OPTIONS=-i grep a <<< A
A
4,328
Posted By steezuschrist96
How to use env command to change GREP_OPTIONS variable?
How could I use the env command to change the enviroment variable GREP_OPTIONS so that grep is not case sensitive by setting it to "-i'?

So that the command:

grep a <<< A


Will produce the...
3,679
Posted By steezuschrist96
How do I use grep to grab prime number output from my factor program?
I have a factor program that runs and outputs to stdout all the prime numbers that are specified in the given paramters, in this case 30000000-31000000.

Command:

factor/factor...
4,574
Posted By steezuschrist96
Trying to learn about the cut command and use it...
Trying to learn about the cut command and use it to cut a specific column from the ls -l command, just wondering what I would have do to cut specific parts from text output, in this case the...
4,574
Posted By steezuschrist96
How do I use the cut command to only print the directories?
How would I use ls -l | cut to just print the directories part from the ls -l command?
3,347
Posted By steezuschrist96
How to use printf to output a shell variable path?
So I created two shell variables: COLUMN1_HEADING, COLUMN2_HEADING.
They have values:
COLUMN1_HEADING="John"
COLUMN2_HEADING="123456789"

How would I use printf to get it to print an output...
2,124
Posted By steezuschrist96
Yes! That worked, thank you!
Yes! That worked, thank you!
2,124
Posted By steezuschrist96
Using grep to select specific patterns in text file?
How do I use grep to select words that start with I or O, end in box, and contain at least one letter in between them?

the text file mailinfo.txt contains


Inbox
the Inbox
Is a match box...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy