Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions baskup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ for line in $(select_rows "select distinct guid from chat;" ); do
select is_from_me,text, datetime((date/1000000000) + strftime('%s', '2001-01-01 00:00:00'), 'unixepoch', 'localtime') as date from message where handle_id=(
select handle_id from chat_handle_join where chat_id=(
select ROWID from chat where guid='$line')
)" | sed 's/1\|/Me: /g;s/0\|/Friend: /g' > $BACKUP_DIR/$contactNumber/$line.txt
)" | sed 's/'1\|'/Me: /g;s/'0\|'/Friend: /g' > $BACKUP_DIR/$contactNumber/$line.txt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
)" | sed 's/'1\|'/Me: /g;s/'0\|'/Friend: /g' > $BACKUP_DIR/$contactNumber/$line.txt
)" | sed 's/1\|/Me: /;s/0\|/Friend: /' > $BACKUP_DIR/$contactNumber/$line.txt

else
select_rows "
select is_from_me,text, datetime(date + strftime('%s', '2001-01-01 00:00:00'), 'unixepoch', 'localtime') as date from message where handle_id=(
select handle_id from chat_handle_join where chat_id=(
select ROWID from chat where guid='$line')
)" | sed 's/1\|/Me: /g;s/0\|/Friend: /g' > $BACKUP_DIR/$contactNumber/$line.txt
)" | sed 's/'1\|'/Me: /g;s/'0\|'/Friend: /g' > $BACKUP_DIR/$contactNumber/$line.txt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
)" | sed 's/'1\|'/Me: /g;s/'0\|'/Friend: /g' > $BACKUP_DIR/$contactNumber/$line.txt
)" | sed 's/1\|/Me: /;s/0\|/Friend: /' > $BACKUP_DIR/$contactNumber/$line.txt

fi

if [[ $BACKUP_ATTACHMENTS == 1 ]]; then
Expand Down