Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Shell Script - Syntax help

Posted on 2011-03-23
2
Medium Priority
?
402 Views
Last Modified: 2012-05-11
What does it mean if they say the following

Edit Makefile with following commands:
1,$s?/lib/ ?/lib32/ ?g
1,$s?-q64??g
1,$s?/lib/sysliblist?/lib32/sysliblist?g
0
Comment
Question by:mnis2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 79

Expert Comment

by:arnold
ID: 35204432
Is this a homework assignment? Presumably the editor used is VI/VIM,etc.
The initial parameter deals with the scope.
The next deals with the action and the condition under which the action is taken.
The end entry deals with specifying options i.e. case sensitive insensitive, repeat, etc.
 
0
 
LVL 48

Accepted Solution

by:
Tintin earned 2000 total points
ID: 35204676
1,$  means from line 1 to the end of file

s means substitute

s?/lib/ ?/lib32/ ?g  means substitute all occurances of /lib/ with /lib32/
s?-q64??g means substitute all occurences of -q64 with nothing, ie: delete it
s?/lib/sysliblist?/lib32/sysliblist?g means substitute all ocurrences of /lib/syslibist with /lib32/sysliblist
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question