Skip to content

Simple tool to search a file for a string, if found, search a second string from that point

License

Notifications You must be signed in to change notification settings

adamb3ll/fileparser_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fileparser

A simple tool for searching for a string and then searching for a second string after the first one is found.

C++ Version

Swift Version

fileparser [optional: -verbose] [inputfile] ["first search string"] ["second search string"]

Returns 0 for successfully finding the first and second string.

Example usage:

Check to see if a phone is connected to a computer via Bluetooth:

system_profiler SPBluetoothDataType > btdata.txt
./fileparser btdata.txt "My iPhone" "Connected: Yes"

if [ $? == 0 ]; then
  echo "Connected"
else
  echo "Not Connected"
fi

About

Simple tool to search a file for a string, if found, search a second string from that point

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages