|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Emergency UNIX and Linux Support !! Help Me!! Post your urgent questions here for highest visibility. Posting a new thread to this forum requires Bits. We monitor this forum to help people with emergencies, but we do not guarantee response time or answers. This forum is "best effort" only. Members who reply to posts here receive a bonus of 1000 Bits per reply. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to use read the char * from file?
i have a file 1.txt. the file contains:
* server1.com : ewf,wefwef,wef,wef ------------------------------------- * server2.com : ewf,wefwef,wef,wef ------------------------------------- * server3.com : ewf,wefwef,wef,wef ------------------------------------- how can i read * ? from the start of the line? the is the code Code: #!/bin/bash while read line do [[ "$line" =~ ^*server1.com ]] && url=${line##*: } done < 1.txt for U in ${url//,/ } do printf "http://$U.com\n" done it doesnt work........... |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Double posting not allowed.
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
what should i do? remove?
---------- Post updated at 08:55 AM ---------- Previous update was at 04:48 AM ----------
someone please?? |
|
#5
|
|||
|
|||
|
Bumping up posts or double posting is not permitted in these forums.
Please read the rules, which you agreed to when you registered, if you have not already done so. You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future Thank You. The UNIX and Linux Forums. |
| The Following User Says Thank You to Corona688 For This Useful Post: | ||
zigizag (02-28-2013) | ||
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error: invalid conversion from ‘const char*’ to ‘char*’ | GSO | Programming | 8 | 06-09-2011 12:39 PM |
| concat const char * with char * | nicos | Programming | 4 | 02-18-2009 12:01 PM |
| Adding a single char to a char pointer. | pallak7 | Programming | 5 | 12-06-2008 10:46 PM |
| How to replace any char with newline char. | mightysam | Shell Programming and Scripting | 5 | 09-18-2008 08:15 PM |
| need shell script to get last 10 char from a file name and write in to a new file | raj0390 | Shell Programming and Scripting | 2 | 07-28-2008 07:09 AM |
|
|