Options

Linux help with ubuntu

gregorio323gregorio323 Member Posts: 201 ■■■□□□□□□□
Hey, guys i'm currently starting my Linux journey and having difficulty with one of my labs since i dont associate with none of my class mates thought i'd rely on my reliable source techexams :).

I'm a little lost with the commands not a linux guy icon_sad.gif want to be!. This is for my linux class he wants us to make a basic BASH script to find a certain type of string in a file. using the following

$ fsearch
String to search for:
someSearchString
File to search in: someFileName
[results displayed here...]

also using the basic of the "if" or "else". If you guys can help me would be greatly appriciated. just looking for tips or examples or maybe a little explanation i want this to be a learning experience.

Comments

  • Options
    rogue2shadowrogue2shadow Member Posts: 1,501 ■■■■■■■■□□
    What do you have so far (syntax wise)? Maybe we can help from there icon_thumright.gif
  • Options
    stuh84stuh84 Member Posts: 503
    I'm going to try and point you in the right direction, by saying you can probably do this with the grep tool, along with setting some variables and reading in commands (note the bolded parts, give them a google :))
    Work In Progress: CCIE R&S Written

    CCIE Progress - Hours reading - 15, hours labbing - 1
Sign In or Register to comment.